Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for new python-3.13 #35

Merged
merged 1 commit into from
Dec 23, 2024

Conversation

UffeJakobsen
Copy link
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
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
1 check passed
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