Errors with most recent idna package (3.9)
Please first check if another issue has been opened for your problem
Versions
- OS: Arch Linux
- Gajim version: 7aa2fac6
- GTK version: 3.24.43
- Python-nbxmpp version: b44690da
Steps to reproduce the problem
- Install gajim from most recent git
Expected behavior
Gajim launches.
Actual behavior
Traceback (most recent call last):
File "/home/user/.local/lib/gajim/venv/lib/python3.12/site-packages/nbxmpp/protocol.py", line 559, in validate_domainpart
domainpart = idna2008_prep(domainpart)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.local/lib/gajim/venv/lib/python3.12/site-packages/nbxmpp/protocol.py", line 574, in idna2008_prep
domain = idna.uts46_remap(domain)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.local/lib/gajim/venv/lib/python3.12/site-packages/idna/core.py", line 385, in uts46_remap
raise InvalidCodepoint(
idna.core.InvalidCodepoint: Codepoint U+002E at position 4 does not follow STD3 rules
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/user/.local/lib/gajim/venv/lib/python3.12/site-packages/nbxmpp/protocol.py", line 652, in from_string
return cls(localpart=localpart,
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.local/lib/gajim/venv/lib/python3.12/site-packages/nbxmpp/protocol.py", line 636, in __init__
domain = validate_domainpart(domain)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.local/lib/gajim/venv/lib/python3.12/site-packages/nbxmpp/protocol.py", line 561, in validate_domainpart
raise DomainpartNotAllowedChar
nbxmpp.protocol.DomainpartNotAllowedChar: Not allowed character in domainpart
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/user/.local/lib/gajim/venv/lib/python3.12/site-packages/gajim/gtk/application.py", line 383, in _handle_local_options
self._startup()
File "/home/user/.local/lib/gajim/venv/lib/python3.12/site-packages/gajim/gtk/application.py", line 221, in _startup
if not self._init_core():
^^^^^^^^^^^^^^^^^
File "/home/user/.local/lib/gajim/venv/lib/python3.12/site-packages/gajim/common/application.py", line 70, in _init_core
app.settings.init()
File "/home/user/.local/lib/gajim/venv/lib/python3.12/site-packages/gajim/common/settings.py", line 217, in init
self._load_settings()
File "/home/user/.local/lib/gajim/venv/lib/python3.12/site-packages/gajim/common/settings.py", line 605, in _load_settings
self._settings[row.name] = json.loads(row.settings,
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/json/__init__.py", line 359, in loads
return cls(**kw).decode(s)
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/json/decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.local/lib/gajim/venv/lib/python3.12/site-packages/gajim/common/storage/base.py", line 160, in json_decoder
return JID.from_string(dct['value'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.local/lib/gajim/venv/lib/python3.12/site-packages/nbxmpp/protocol.py", line 656, in from_string
raise InvalidJid('Unable to parse "%s"' % jid_string) from error
nbxmpp.protocol.InvalidJid: Unable to parse "room@muc.domain.tld"
Traceback (most recent call last):
File "/home/user/.local/lib/gajim/venv/lib/python3.12/site-packages/gajim/gtk/application.py", line 322, in _shutdown
self._shutdown_core()
File "/home/user/.local/lib/gajim/venv/lib/python3.12/site-packages/gajim/common/application.py", line 247, in _shutdown_core
app.storage.archive.cleanup_chat_history()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'cleanup_chat_history'
When downgrading the idna package to 3.8 it works fine. The idna 3.9 package came out just recently: https://pypi.org/project/idna/#history. Not sure what parts of the changes might have caused this.