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

convert2ripemd160.py return error "'NoneType' object is not iterable" #20

Closed
dolaor opened this issue Mar 31, 2021 · 2 comments
Closed

Comments

@dolaor
Copy link

dolaor commented Mar 31, 2021

Hi!

Thank you for sharing your script.

I have tried to run convert2ripemd160.py on a .csv file containing 1 address per line (starting by "1" or "bc1") but it is returning an error (see below). The error appears when it hits adresses starting with "bc1" and if I remove them all in the .csv file there is no errors.

On Debian 10 with Python 3.7.3:
Traceback (most recent call last):
File "convert2ripemd160.py", line 46, in
process(args.csvin)
File "convert2ripemd160.py", line 22, in process
ripemd_encoded = binascii.hexlify(bytearray(script_int))
TypeError: 'NoneType' object is not iterable

On Windows with Python 3.9.2:
Traceback (most recent call last):
File "C:\Users\Dolaor\Desktop\btcposbal2csv\convert2ripemd160.py", line 46, in
process(args.csvin)
File "C:\Users\Dolaor\Desktop\btcposbal2csv\convert2ripemd160.py", line 22, in process
ripemd_encoded = binascii.hexlify(bytearray(script_int))
TypeError: cannot convert 'NoneType' object to bytearray

Thanks for your help.

@dolaor dolaor closed this as completed Apr 3, 2021
@dolaor
Copy link
Author

dolaor commented Apr 3, 2021

It is not an elegant solution but I had to add ",," at the end of each addresses (starting by "1" or "bc1") in the input .csv file containing one address per line. Then after running the command "convert2ripemd160.py input.csv > output.csv" the ripemd160 will be in the fourth column of the output .csv file.

@bsubasic
Copy link

bsubasic commented Nov 1, 2021

Yes, it would be helpful to have an example output (on Github) from the btcposbal2csv.py script as convert2ripemd160.py expects exactly that format as input.

Then we would know how to format our input file if we use only convert2ripemd160.py.

By looking into the script code, it is:
address, value_satoshi, last_height

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