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

pyxdg changed api #711

Closed
faebser opened this issue Sep 22, 2022 · 2 comments
Closed

pyxdg changed api #711

faebser opened this issue Sep 22, 2022 · 2 comments

Comments

@faebser
Copy link

faebser commented Sep 22, 2022

When I run hamster from the comand line, I get the following error:

Traceback (most recent call last):
  File "/usr/bin/hamster", line 40, in <module>
    from hamster import client, reports
  File "/usr/lib/python3.10/site-packages/hamster/reports.py", line 33, in <module>
    from hamster.lib.configuration import runtime
  File "/usr/lib/python3.10/site-packages/hamster/lib/configuration.py", line 29, in <module>
    from xdg.BaseDirectory import xdg_data_home
ModuleNotFoundError: No module named 'xdg.BaseDirectory'

It seems that thepyxdg==0.28 version has changed the module structure to access the BaseDirectory

@faebser
Copy link
Author

faebser commented Sep 22, 2022

While trying to setup a dev enviorment I created a virtualenv to run hamster inside with the following packages:

dbus-python==1.3.2 pgi==0.0.11.2 pycairo==1.21.0 PyGObject==3.42.2 pyxdg==0.28

and it ran without a problem, so it seems that the problem is related to my environment. I'm running arch linux and installed both hamster and python-xdg with pacman.

@faebser
Copy link
Author

faebser commented Sep 22, 2022

It seems that I had both pyxdg==0.28 and xdg==5.1.1 installed which lead to xdg shadowing pyxdg, leading to the error. I removed xdg and now hamster works again :)

@faebser faebser closed this as completed Sep 22, 2022
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

No branches or pull requests

1 participant