ivilata / pymultihash

Python implementation of the multihash specification
19 stars 8 forks source link

fix base58 encode bug #8

Closed strdn closed 1 year ago

strdn commented 5 years ago

.encode('base58') error: "encoding without a string argument"

How to reproduce:

>>> import multihash
>>> mh = multihash.decode(b'\x12 \xb3\x9b\xed\xf8\x9d}\xf75G$\x84f\x97\xd6\x1b\xcev\xf9\xfdW{@{\x86-\x181\xa0tb\x88\xe2')
>>> mh.encode('base58')
Traceback (most recent call last):
  File "<input>", line 1, in <module>
TypeError: encoding without a string argument

Python version: 3.6.6. pymultihash version: 0.8.2 base58 version: 1.0.2

guysv commented 5 years ago

bump. this is sorta critical..

ivilata commented 1 year ago

Sorry @strdn (and @guysv) for the big delay, I've been busy with other stuff and didn't have the time to handle this.

As you can see in ebd29b4, this was caused by a change in the return type of base58.b58encode as of v1.0. The commit requires at least that version and relies on the new function signature.

Thanks for pointing this out!