Bitcoin Forum
January 06, 2026, 05:27:02 PM *
News: Latest Bitcoin Core release: 30.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Issue with Python version on latest commit 9c4e9f1 in dev branch  (Read 54 times)
Aethereal (OP)
Newbie
*
Offline Offline

Activity: 18
Merit: 15


View Profile
May 26, 2025, 10:04:55 AM
Merited by goatpig (1), nc50lc (1)
 #1

Hello @goatpig

I tried the latest commit on 2 different environments and I had different results.

On Python 3.13.3 there was no error

On Python 3.11.2 I got this:

Code:
Traceback (most recent call last):
  File "/home/test/Armory/BitcoinArmory/ArmoryQt.py", line 80, in <module>
    from qtdialogs.DlgWalletDetails import DlgWalletDetails
  File "/home/test/Armory/BitcoinArmory/qtdialogs/DlgWalletDetails.py", line 41, in <module>
    from qtdialogs.DlgBackupCenter import DlgBackupCenter, DlgSimpleBackup
  File "/home/test/Armory/BitcoinArmory/qtdialogs/DlgBackupCenter.py", line 650
    f'<font color="{htmlColor('TextBlue')}" '
                               ^^^^^^^^
SyntaxError: f-string: unmatched '('

This is apparently due to the fact in Python 3.12 the parsing of nested quotes was changed (might even say "improved").

Unfortunately Python 3.11 is still the default on Debian 12 and derivatives like the RaspiOS I got the error on. That might trigger the need to bundle the right Python with the final public release unless you have some sort of work-around.

On a side note, I have a problem since your previous commit: If I launch Armory against an old .armory folder I had from a back-up, it doesn't recognize neither the wallet nor the watch-only wallet that there were inside.
Since the load digital backup dialog is still not working, I can't try to see if they would work if manually imported.
If possible I would like to load the binary backups as they pair the addresses I used with the description I gave them, while restoring a paper backup of course lacks the descriptions.

goatpig
Moderator
Legendary
*
Offline Offline

Activity: 4060
Merit: 1395

Armory Developer


View Profile
May 26, 2025, 04:57:48 PM
Merited by nc50lc (1)
 #2

Quote
This is apparently due to the fact in Python 3.12 the parsing of nested quotes was changed (might even say "improved").

Tried a blind fix, should be doing better regardless. The error is kinda obvious.

Quote
On a side note, I have a problem since your previous commit: If I launch Armory against an old .armory folder I had from a back-up, it doesn't recognize neither the wallet nor the watch-only wallet that there were inside.
Since the load digital backup dialog is still not working, I can't try to see if they would work if manually imported.
If possible I would like to load the binary backups as they pair the addresses I used with the description I gave them, while restoring a paper backup of course lacks the descriptions.

Are you saying it's failing to read from .lmdb files (new cpp wallets) or from .wallet files (old python wallets)?

As for the python versions:
- 3.13 doesnt work cause capnp chokes
- 3.12 I target using pyenv and a venv
- I can target 3.11 and just work off of that tbf. Python will be frozen for the Windows release but I don't know if that's kosher for Linux packages.

Aethereal (OP)
Newbie
*
Offline Offline

Activity: 18
Merit: 15


View Profile
May 29, 2025, 10:00:06 AM
Merited by goatpig (1)
 #3

Unfortunately, the fix still have issues with 3.11 (works fine on 3.13)

Code:
Traceback (most recent call last):
  File "/home/test/Armory/BitcoinArmory/ArmoryQt.py", line 80, in <module>
    from qtdialogs.DlgWalletDetails import DlgWalletDetails
  File "/home/test/Armory/BitcoinArmory/qtdialogs/DlgWalletDetails.py", line 41, in <module>
    from qtdialogs.DlgBackupCenter import DlgBackupCenter, DlgSimpleBackup
  File "/home/test/Armory/BitcoinArmory/qtdialogs/DlgBackupCenter.py", line 750
    f'{str(self.fragData['M'])}</b></font> fragments with this '
                          ^
SyntaxError: f-string: unmatched '['

I am a bit puzzled as I can't spot the issue this time, unless it needs some characters to be escaped...

About reading wallets, I'm talking about old .wallet format (my backup is about 7 years old).
goatpig
Moderator
Legendary
*
Offline Offline

Activity: 4060
Merit: 1395

Armory Developer


View Profile
May 29, 2025, 11:01:32 AM
 #4

I'm writing tests for the migration code as we speak, then I'll slap the new migration wizard on top. I should have something by the weekend.

With regards to py3.11, I will do a run on 3.11 but I expect I won't find the issues until I spawn the related dialog, so keep reporting those as you find them, that helps. I did another blind pass with a wider heuristic, hopefully this is enough to get you through for now.

Aethereal (OP)
Newbie
*
Offline Offline

Activity: 18
Merit: 15


View Profile
May 29, 2025, 12:09:36 PM
 #5

The last code seems to work on 3.11
The errors where thrown at launch of the program, not when actually using the affected dialogs. I assume it happened when python updates __pychache__ and compiles the modified files into .pyc
Since now I was able to get to the program window, I assume all the files passed the compile phase under python 3.11

Thanks for your prompt response.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!