sammchardy / python-binance-chain

Binance Chain Exchange API python implementation for automated trading

Home Page:http://python-binance-chain.rtfd.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ValueError: invalid literal for int() with base 10: '{id}'

kentenzer opened this issue · comments

Hi,

I am using latest source from: https://github.com/sammchardy/python-binance-chain.git

`from binance_chain.wallet import Wallet
from binance_chain.environment import BinanceEnvironment

if name == 'main':
# initialise with Testnet environment
env = BinanceEnvironment.get_testnet_env()
wallet = Wallet.create_random_wallet(env=env)
print(wallet.address)
print(wallet.private_key)
print(wallet.public_key_hex)`

And I get the following error:

`Traceback (most recent call last):
File "/Users/ken/Documents/GitHub/BSC/main.py", line 9, in
wallet = Wallet.create_random_wallet(env=env)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/ken/Documents/GitHub/BSC/binance_chain/wallet.py", line 137, in create_random_wallet
return cls.create_wallet_from_mnemonic(phrase, env=env)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/ken/Documents/GitHub/BSC/binance_chain/wallet.py", line 153, in create_wallet_from_mnemonic
child_wallet = new_wallet.subkey_for_path(Wallet.HD_PATH)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/ken/Documents/GitHub/BSC/ENV/lib/python3.12/site-packages/pycoin/key/BIP32Node.py", line 208, in subkey_for_path
v = int(v)
^^^^^^
ValueError: invalid literal for int() with base 10: '{id}'

Process finished with exit code 1`

Any idea of what the problem is?