Post
Topic
Board Armory
Merits 1 from 1 user
Re: Armory dev branches errors with Python >3.9
by
Aethereal
on 27/02/2025, 11:09:58 UTC
⭐ Merited by BitMaxz (1)
Hello, and thank you for your prompt answer.

Answering your points:

1 - I have just tried building against the loading_wallets branch, and encountered the same issue (more on that later)

2 - I am building following the instructions you linked (these seems to be the same I found when working on the capnp branch), even if I had to explicit the paths for libbtc and libwebsockets in configure (I followed the suggested dir structure including build subdirs where indicated).

3 - My issue is that most QT calls give errors about the arguments being of "float" type when they expects "int" and looking around I found that before python 3.10 there was an automatic conversion of type deprecated in 3.10 and later, so I wrongfully assumed you were using an old version of python where this still happened automatically. I confirm I have the python-qtpy and python-pyqt5 packages installed and I also tried installing pysides6 but things didn't changed.

This is the errors if gives me on first run:

Code:
╭─lab@AI in repo: BitcoinArmory on  loading_wallets via △ v3.31.6 via  v3.13.2 took 0s
╰─λ python ArmoryQt.py --offline
********************************************************************************
Loading Armory Engine:
Armory Version:       0.96.99
Armory Build:         None
PyBtcWallet  Version: 1.99
Detected Operating system: Linux
OS Variant            : ('Garuda Linux', 'Soaring', 'BirdOfPrey')
User home-directory   : /home/lab
Satoshi BTC directory : /home/lab/.bitcoin
Armory home dir       : /home/lab/.armory/
ArmoryDB directory     : /home/lab/.armory/databases
Armory settings file  : /home/lab/.armory/ArmorySettings.txt
Armory log file       : /home/lab/.armory/armorylog.txt
Do wallet checking    : True
/home/lab/BitcoinArmory/qtdialogs/DlgRestore.py:106: SyntaxWarning: invalid escape sequence '\ '
inpMask = '<AAAA\ AAAA\ AAAA\ AAAA\ \ AAAA\ AAAA\ AAAA\ AAAA\ \ AAAA!'
/home/lab/BitcoinArmory/qtdialogs/DlgRestore.py:1050: SyntaxWarning: invalid escape sequence '\ '
inpMask = '<AAAA\ AAAA\ AAAA\ AAAA\ \ AAAA\ AAAA\ AAAA\ AAAA\ \ AAAA!'
/home/lab/BitcoinArmory/qtdialogs/DlgRestore.py:1053: SyntaxWarning: invalid escape sequence '\ '
inpMaskID = '<HHHH\ HHHH\ HHHH\ HHHH!'
/home/lab/BitcoinArmory/qtdialogs/DlgRestore.py:1237: SyntaxWarning: invalid escape sequence '\ '
inpMask = '<AAAA\ AAAA\ AAAA\ AAAA\ AA!'
/home/lab/BitcoinArmory/qtdialogs/DlgRestore.py:1247: SyntaxWarning: invalid escape sequence '\ '
inpMask = '<AAAA\ AAAA\ AAAA\ AAAA\ \ AAAA\ AAAA\ AAAA\ AAAA\ \ AAAA!'
(ERROR) Settings.py:203 - Unsupported language  specified. Defaulting to English (en)
(ERROR) Traceback (most recent call last):
File "/home/lab/BitcoinArmory/ArmoryQt.py", line 5265, in <module>
armoryMainWindow = ArmoryMainWindow(splashScreen=SPLASH)
File "/home/lab/BitcoinArmory/ArmoryQt.py", line 356, in __init__
initialColResize(self.walletsView, [20, 0.15, 0.30, 0.2, 0.20])
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/lab/BitcoinArmory/qtdialogs/qtdefines.py", line 208, in initialColResize
tblViewObj.horizontalHeader().resizeSection(c, pct*szRemain)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
TypeError: resizeSection(self, logicalIndex: int, size: int): argument 2 has unexpected type 'float'

Traceback (most recent call last):
File "/home/lab/BitcoinArmory/ArmoryQt.py", line 5265, in <module>
armoryMainWindow = ArmoryMainWindow(splashScreen=SPLASH)
File "/home/lab/BitcoinArmory/ArmoryQt.py", line 356, in __init__
initialColResize(self.walletsView, [20, 0.15, 0.30, 0.2, 0.20])
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/lab/BitcoinArmory/qtdialogs/qtdefines.py", line 208, in initialColResize
tblViewObj.horizontalHeader().resizeSection(c, pct*szRemain)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
TypeError: resizeSection(self, logicalIndex: int, size: int): argument 2 has unexpected type 'float'
Please call QDesktopServices::unsetUrlHandler() before destroying a registered URL handler object.
Support for destroying a registered URL handler object is deprecated, and will be removed in Qt 6.6.
Please call QDesktopServices::unsetUrlHandler() before destroying a registered URL handler object.
Support for destroying a registered URL handler object is deprecated, and will be removed in Qt 6.6.


If I change
tblViewObj.horizontalHeader().resizeSection(c, pct*szRemain)
to
tblViewObj.horizontalHeader().resizeSection(c, int(pct*szRemain))
I can progress further, and doing the same for a couple of similar errors thrown, I get to the main program window.

I don't know if in your environment there's something that forces the casting of types, apparently there isn't on mine (and on miklerokamm's as he had the same issues showing on his logs).

For further information, I  installed the following packages not included in the default distro install to be able to successfully compile (might be useful for other people trying it):

capnproto
python-pycapnp
python-distro
python-cffi
python-setuptools
python-qtpy
python-lmdb

Thanks for your attention and keep up the good work!