You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last): File "main.py", line 28, in <module> key_obj = Key.from_pem( key ) File "/home/silvio/Sviluppo/vest/vendor/code_manager/code_manager/lib/python3.6/site-packages/bit/wallet.py", line 392, in from_pem return PrivateKey(ECPrivateKey.from_pem(pem)) File "/home/silvio/Sviluppo/vest/vendor/code_manager/code_manager/lib/python3.6/site-packages/coincurve/keys.py", line 159, in from_pem pem_to_der(pem) File "/home/silvio/Sviluppo/vest/vendor/code_manager/code_manager/lib/python3.6/site-packages/coincurve/utils.py", line 90, in pem_to_der pem.strip()[28:-25].replace(b'\n', b'') TypeError: replace() argument 1 must be str, not bytes
I don't have experience using PEM with Bit. But the PEM was generated outside of Bit? Because when I generate a PrivateKey using Bit, export it to PEM and then import it again it works.
I'm trying to import a pem key:
But what I get is:
Traceback (most recent call last): File "main.py", line 28, in <module> key_obj = Key.from_pem( key ) File "/home/silvio/Sviluppo/vest/vendor/code_manager/code_manager/lib/python3.6/site-packages/bit/wallet.py", line 392, in from_pem return PrivateKey(ECPrivateKey.from_pem(pem)) File "/home/silvio/Sviluppo/vest/vendor/code_manager/code_manager/lib/python3.6/site-packages/coincurve/keys.py", line 159, in from_pem pem_to_der(pem) File "/home/silvio/Sviluppo/vest/vendor/code_manager/code_manager/lib/python3.6/site-packages/coincurve/utils.py", line 90, in pem_to_der pem.strip()[28:-25].replace(b'\n', b'') TypeError: replace() argument 1 must be str, not bytes
So I tried:
But what I get is:
Traceback (most recent call last): File "main.py", line 28, in <module> key_obj = Key.from_pem( key ) File "/home/silvio/Sviluppo/vest/vendor/code_manager/code_manager/lib/python3.6/site-packages/bit/wallet.py", line 392, in from_pem return PrivateKey(ECPrivateKey.from_pem(pem)) File "/home/silvio/Sviluppo/vest/vendor/code_manager/code_manager/lib/python3.6/site-packages/coincurve/keys.py", line 160, in from_pem ).native['private_key']['private_key']), KeyError: 'private_key'
Your docs say:
So I tried:
But the risult is the same.
Any help?
Thank you
The text was updated successfully, but these errors were encountered: