Blockstream / Blockstream/garecovery
UnicodeDecodeError: 'ascii' codec can't decode byte
- Dominant language
- Python
- Stars
- 135
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
I'm trying this on testnet, and getting the below crash! Any help please
```
(.venv) root@5f39888528d5:/garecovery# hexdump -C ~/men
00000000 62 69 74 74 65 72 20 72 65 6d 69 6e 64 20 61 72 |bitter remind ar|
00000080 72 79 20 6c 65 67 65 6e 64 20 67 75 6e 20 69 6d |ry legend gun im|
00000090 69 74 61 74 65 0a |itate.|
00000096
(.venv) root@5f39888528d5:/garecovery# hexdump -C nlock
00000000 47 41 65 6e 63 72 79 70 74 65 64 80 00 00 00 00 |GAencrypted.....|
00000010 5f f9 bb 90 65 fa b7 37 38 37 80 5e 69 f3 26 73 |_...e..787.^i.&s|
00000020 71 a5 ae 39 48 ac 86 ae ce be 1d fd 9f 64 4a 70 |q..9H........dJp|
00000030 e8 93 90 aa ed 77 6a f1 02 5e 1a c8 b1 db 7f b2 |.....wj..^......|
00000040 c9 68 7a fc c1 69 01 5e 5a d1 12 43 39 f7 2e 04 |.hz..i.^Z..C9...|
00000050 62 80 f3 52 0d 4b ae 03 d8 ea c9 e6 1e d3 1f c3 |b..R.K..........|
00000060 ef f1 5e c5 |..^.|
00000064
(.venv) root@5f39888528d5:/garecovery# rm -rf garecovery.csv && garecovery-cli -n testnet --nlocktime-file nlock --mnemonic-file ~/men -d 2of2
INFO:root:Reading nlocktime transactions from nlock
Traceback (most recent call last):
File "/garecovery/.venv/bin/garecovery-cli", line 7, in
sys.exit(recoverycli.main(sys.argv))
File "/garecovery/.venv/lib/python3.8/site-packages/garecovery/recoverycli.py", line 96, in main
recovery = get_recovery(clargs.args, mnemonic, seed)
File "/garecovery/.venv/lib/python3.8/site-packages/garecovery/recoverycli.py", line 69, in get_recovery
return TwoOfTwo(mnemonic, seed, options.nlocktime_file)
File "/garecovery/.venv/lib/python3.8/site-packages/garecovery/two_of_two.py", line 29, in __init__
self.txdata = [json.loads(txdata.decode("ascii")) for txdata in zipdata]
File "/garecovery/.venv/lib/python3.8/site-packages/garecovery/two_of_two.py", line 29, in
self.txdata = [json.loads(txdata.decode("ascii")) for txdata in zipdata]
UnicodeDecodeError: 'ascii' codec can't decode byte 0x80 in position 11: ordinal not in range(128)
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with garecovery/two_of_two.py at the txdata.decode("ascii") call, then trace how recoverycli.py passes --nlocktime-file into TwoOfTwo. Reproduce the failure with the supplied nlock and mnemonic inputs and inspect the file-format assumptions around the failing bytes. Done means the reported input is handled with a verified result or a clear user-facing validation error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, cryptography, security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100