Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ecdsa_verify_addr fails on python3 #152

Open
awemany opened this issue Mar 22, 2017 · 1 comment
Open

ecdsa_verify_addr fails on python3 #152

awemany opened this issue Mar 22, 2017 · 1 comment

Comments

@awemany
Copy link

awemany commented Mar 22, 2017

Works on python2:

bitcoin.ecdsa_verify_addr("a", "HAxTs/0PxPTCUVs7i0vWkaNtVAngQgHfJygNu9tfPna1Z5piImtwpr1XfTu7znc0g2m8uTDHcLu0JJFrwq5OqLM=", "1R7xTYaXV4pwsjnd8wjnx4LPoS2JAbQFm")
returns False

But on python3, I get:

TypeError: ord() expected string of length 1, but int found

@hmisty
Copy link

hmisty commented Mar 24, 2020

You can fix it by yourself like this:

.../lib/python3.7/site-packages/bitcoin/main.py:435

435 return ord(data[0])

change to:

435 if type(data[0]) is int:
436 return data[0]
437 else:
438 return ord(data[0])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants