LedgerHQ / satstack

Bitcoin full node with Ledger Live
BSD 2-Clause "Simplified" License
159 stars 32 forks source link

getdescriptor invalid literal for int() with base 10: '' #100

Closed razimih closed 1 year ago

razimih commented 1 year ago

Hello, tried to follow the instructions, here is what I get:

(venv) D:\work\Ledger\LedgerHQ_satstack\scripts>python getdescriptor --scheme segwit --chain test --account 3
Traceback (most recent call last):
  File "D:\work\Ledger\LedgerHQ_satstack\scripts\getdescriptor", line 180, in <module>
    main()
  File "D:\work\Ledger\LedgerHQ_satstack\scripts\venv\Lib\site-packages\click\core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\work\Ledger\LedgerHQ_satstack\scripts\venv\Lib\site-packages\click\core.py", line 1055, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "D:\work\Ledger\LedgerHQ_satstack\scripts\venv\Lib\site-packages\click\core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\work\Ledger\LedgerHQ_satstack\scripts\venv\Lib\site-packages\click\core.py", line 760, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\work\Ledger\LedgerHQ_satstack\scripts\getdescriptor", line 172, in main
    descriptor_factory = derive_output_descriptors(client, scheme, chain, account)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\work\Ledger\LedgerHQ_satstack\scripts\getdescriptor", line 139, in derive_output_descriptors
    xpub = client.get_extended_pubkey(derivation.path)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\work\Ledger\LedgerHQ_satstack\scripts\venv\Lib\site-packages\ledger_bitcoin\client_legacy.py", line 90, in get_extended_pubkey
    pubkey = self.app.getWalletPublicKey(path, display)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\work\Ledger\LedgerHQ_satstack\scripts\venv\Lib\site-packages\ledger_bitcoin\btchip\btchip.py", line 94, in getWalletPublicKey
    donglePath = parse_bip32_path(path)
                 ^^^^^^^^^^^^^^^^^^^^^^
  File "D:\work\Ledger\LedgerHQ_satstack\scripts\venv\Lib\site-packages\ledger_bitcoin\btchip\btchipHelpers.py", line 85, in parse_bip32_path
    writeUint32BE(0x80000000 | int(element[0]), result)
                               ^^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: ''

Any idea ? I am on Python 3.11.1 Windows 11 Python 3.11.1 (tags/v3.11.1:a7a450f, Dec 6 2022, 19:58:39) [MSC v.1934 64 bit (AMD64)] on win32 Thanks

adrienlacombe commented 1 year ago

hi, I will try to reproduce

adrienlacombe commented 1 year ago

@razimih please git pull from master and rebuild your venv, it should work now.

razimih commented 1 year ago

Works now . Thanks