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

optional gtk dependency? #32

Open
victornoel opened this issue Dec 3, 2021 · 0 comments · May be fixed by #34
Open

optional gtk dependency? #32

victornoel opened this issue Dec 3, 2021 · 0 comments · May be fixed by #34

Comments

@victornoel
Copy link

victornoel commented Dec 3, 2021

Hi, I'm using deluged in an environment where gtk is not installed and no python dependency for gtk is present, and when I try to load the plugin in deluged, I get the following error in the logs:

deluge-deluged-1  | 17:34:51 [ERROR   ][deluge.pluginmanagerbase            :154 ] Unable to instantiate plugin 'Pieces' from '/home/deluge/.config/deluge/plugins/Pieces-0.6-py3.6.egg'!
deluge-deluged-1  | 17:34:51 [ERROR   ][deluge.pluginmanagerbase            :1343] Namespace Gtk not available
deluge-deluged-1  | Traceback (most recent call last):
deluge-deluged-1  |   File "/usr/lib/python3/dist-packages/deluge/pluginmanagerbase.py", line 148, in enable_plugin
deluge-deluged-1  |     instance = cls(plugin_name.replace('-', '_'))
deluge-deluged-1  |   File "/home/deluge/.config/deluge/plugins/Pieces-0.6-py3.6.egg/pieces/__init__.py", line 46, in __init__
deluge-deluged-1  |     from .core import Core as _plugin_cls
deluge-deluged-1  |   File "<frozen importlib._bootstrap>", line 971, in _find_and_load
deluge-deluged-1  |   File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
deluge-deluged-1  |   File "<frozen importlib._bootstrap>", line 656, in _load_unlocked
deluge-deluged-1  |   File "<frozen importlib._bootstrap>", line 626, in _load_backward_compatible
deluge-deluged-1  |   File "/home/deluge/.config/deluge/plugins/Pieces-0.6-py3.6.egg/pieces/core.py", line 49, in <module>
deluge-deluged-1  |     from .colors import Colors
deluge-deluged-1  |   File "<frozen importlib._bootstrap>", line 971, in _find_and_load
deluge-deluged-1  |   File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
deluge-deluged-1  |   File "<frozen importlib._bootstrap>", line 656, in _load_unlocked
deluge-deluged-1  |   File "<frozen importlib._bootstrap>", line 626, in _load_backward_compatible
deluge-deluged-1  |   File "/home/deluge/.config/deluge/plugins/Pieces-0.6-py3.6.egg/pieces/colors.py", line 40, in <module>
deluge-deluged-1  |     from .color import Color
deluge-deluged-1  |   File "<frozen importlib._bootstrap>", line 971, in _find_and_load
deluge-deluged-1  |   File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
deluge-deluged-1  |   File "<frozen importlib._bootstrap>", line 656, in _load_unlocked
deluge-deluged-1  |   File "<frozen importlib._bootstrap>", line 626, in _load_backward_compatible
deluge-deluged-1  |   File "/home/deluge/.config/deluge/plugins/Pieces-0.6-py3.6.egg/pieces/color.py", line 42, in <module>
deluge-deluged-1  |     gi.require_version("Gtk", "3.0")
deluge-deluged-1  |   File "/usr/lib/python3/dist-packages/gi/__init__.py", line 130, in require_version
deluge-deluged-1  |     raise ValueError('Namespace %s not available' % namespace)
deluge-deluged-1  | ValueError: Namespace Gtk not available

I think it should be possible to not fail if GTK is missing and not try to load it?

@petroid petroid linked a pull request Sep 17, 2022 that will close this issue
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 a pull request may close this issue.

1 participant