Skip to content

Fix for new python-3.13#35

Merged
otsaloma merged 1 commit intootsaloma:masterfrom
UffeJakobsen:master_python_update
Dec 23, 2024
Merged

Fix for new python-3.13#35
otsaloma merged 1 commit intootsaloma:masterfrom
UffeJakobsen:master_python_update

Conversation

@UffeJakobsen
Copy link
Copy Markdown
Contributor

Fix for new python-3.13

After Archlinux updating python from 3.12.7-1 to 3.13.1-1 the following error prevented catapult from starting:

Traceback (most recent call last):
  File "/usr/local/share/catapult/catapult/app.py", line 40, in _on_activate
    window = catapult.Window()
  File "/usr/local/share/catapult/catapult/window.py", line 91, in __init__
    self.load_css()
    ~~~~~~~~~~~~~^^
  File "/usr/local/share/catapult/catapult/window.py", line 235, in load_css
    catapult.util.load_theme(catapult.conf.theme),
    ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/share/catapult/catapult/util.py", line 143, in load_theme
    uri = path_to_uri(path)
  File "/usr/local/share/catapult/catapult/util.py", line 160, in path_to_uri
    return "file://{}".format(urllib.parse.quote(path))
                              ^^^^^^^^^^^^
AttributeError: module 'urllib' has no attribute 'parse'

@otsaloma
Copy link
Copy Markdown
Owner

Thanks! Interestingly, I can't reproduce this error. On my Debian the default is still Python 3.12, but I also have 3.13.1 and could test this manually. But, the fix does look correct, that's how I've seen urllib.parse usually used.

@otsaloma otsaloma merged commit 51bc2c7 into otsaloma:master Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants