Попробуй изменить строку 13 следующим образом
For english speakers:
I think the problem is with new line char at the end of key
!/usr/bin/python from pybitcoin import BitcoinPrivateKey import requests import json FILE_PATH = r'ТУТ ВРУЧНУЮ ВВЕДИ ПУТЬ ДО ФАЙЛА С КЛЮЧАМИ' with open(FILE_PATH) as f: keys = f.read().splitlines() for key in keys: private_key = BitcoinPrivateKey(private_key=key.strip()) public_key = private_key.public_key() address = public_key.address() r = requests.get('https://chain.so/api/v2/address/BTC/{}'.format(address)) print ('Address: {} Private Key: {} Balance: {}'.format(address, key, (json.loads(r.content)['data']['balance'])))Я думаю, проблема в том, что ключ имеет символ новый строки
'\n'
в концеFor english speakers:
I think the problem is with new line char at the end of key
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs