stefantalpalaru/deluge-default-trackers

Not working in Deluge 2.0.3 [Ubuntu 20]

haggholm opened this issue · 11 comments

I can build and install, but attempting to add a tracker pukes:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/gi/overrides/Gtk.py", line 110, in _builder_connect_callback
    handler, args = _extract_handler_and_args(obj_or_map, handler_name)
  File "/usr/lib/python3/dist-packages/gi/overrides/Gtk.py", line 90, in _extract_handler_and_args
    raise AttributeError('Handler %s not found' % handler_name)
AttributeError: Handler on_down_button_clicked not found
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/gi/overrides/Gtk.py", line 110, in _builder_connect_callback
    handler, args = _extract_handler_and_args(obj_or_map, handler_name)
  File "/usr/lib/python3/dist-packages/gi/overrides/Gtk.py", line 90, in _extract_handler_and_args
    raise AttributeError('Handler %s not found' % handler_name)
AttributeError: Handler on_remove_button_clicked not found
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/gi/overrides/Gtk.py", line 110, in _builder_connect_callback
    handler, args = _extract_handler_and_args(obj_or_map, handler_name)
  File "/usr/lib/python3/dist-packages/gi/overrides/Gtk.py", line 90, in _extract_handler_and_args
    raise AttributeError('Handler %s not found' % handler_name)
AttributeError: Handler on_edit_button_clicked not found
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/gi/overrides/Gtk.py", line 110, in _builder_connect_callback
    handler, args = _extract_handler_and_args(obj_or_map, handler_name)
  File "/usr/lib/python3/dist-packages/gi/overrides/Gtk.py", line 90, in _extract_handler_and_args
    raise AttributeError('Handler %s not found' % handler_name)
AttributeError: Handler on_add_button_clicked not found
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/gi/overrides/Gtk.py", line 110, in _builder_connect_callback
    handler, args = _extract_handler_and_args(obj_or_map, handler_name)
  File "/usr/lib/python3/dist-packages/gi/overrides/Gtk.py", line 90, in _extract_handler_and_args
    raise AttributeError('Handler %s not found' % handler_name)
AttributeError: Handler on_up_button_clicked not found
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/gi/overrides/Gtk.py", line 110, in _builder_connect_callback
    handler, args = _extract_handler_and_args(obj_or_map, handler_name)
  File "/usr/lib/python3/dist-packages/gi/overrides/Gtk.py", line 90, in _extract_handler_and_args
    raise AttributeError('Handler %s not found' % handler_name)
AttributeError: Handler on_reload_now_clicked not found
Traceback (most recent call last):
  File "/home/petter/.config/deluge/plugins/DefaultTrackers-0.2-py3.8.egg/defaulttrackers/gtk3ui.py", line 231, in on_add_button_clicked
  File "/home/petter/.config/deluge/plugins/DefaultTrackers-0.2-py3.8.egg/defaulttrackers/gtk3ui.py", line 78, in show
AttributeError: 'NoneType' object has no attribute 'set_transient_for'

It looks like it's not finding "config.ui" on this line:

self.builder = Gtk.Builder.new_from_file(get_resource("config.ui"))

How did you generate that egg? I just did python3.6 setup.py bdist_egg, which placed it in "dist/DefaultTrackers-0.2-py3.6.egg", then I used Deluge-2.0.3 compiled with Python-3.6 to install that egg plugin (which made it show up in "~/.config/deluge/plugins", as expected).

Everything works fine. If I look inside the egg (a glorified zip archive), I see "defaulttrackers/data/config.ui" appearing as it should. What's different on your system?

I generated and installed in the same way (except with python3 which resolves to 3.8). But it does leave me with the egg as .config/deluge/plugins/DefaultTrackers-0.2-py3.8.egg, and the egg does have /defaulttrackers/data/config.ui, which appears to be an XML file.

I use pygobject-3.34.0. You?

Based on my apt-cache search, it looks like 3.36—I didn’t explicitly installed it; I installed Deluge via apt

  development headers for GObject Python bindings```

Great Plugin. Have Deluge 2.0.3 on both my Ubuntu 20 Server and Windows 10 Desktop. Create a egg under Windows 10: [DefaultTrackers-0.2-py3.8.egg] and installed it on both clients. Works with no issues :)

Maybe this helps someone => #36

Not working for me either. I click add and nothing happens in the GUI:

Traceback (most recent call last):
  File "/home/user/.local/lib/python3.6/site-packages/gi/overrides/Gtk.py", line 105, in _builder_connect_callback
    handler, args = _extract_handler_and_args(obj_or_map, handler_name)
  File "/home/user/.local/lib/python3.6/site-packages/gi/overrides/Gtk.py", line 85, in _extract_handler_and_args
    raise AttributeError('Handler %s not found' % handler_name)
AttributeError: Handler on_down_button_clicked not found
Traceback (most recent call last):
  File "/home/user/.local/lib/python3.6/site-packages/gi/overrides/Gtk.py", line 105, in _builder_connect_callback
    handler, args = _extract_handler_and_args(obj_or_map, handler_name)
  File "/home/user/.local/lib/python3.6/site-packages/gi/overrides/Gtk.py", line 85, in _extract_handler_and_args
    raise AttributeError('Handler %s not found' % handler_name)
AttributeError: Handler on_remove_button_clicked not found
Traceback (most recent call last):
  File "/home/user/.local/lib/python3.6/site-packages/gi/overrides/Gtk.py", line 105, in _builder_connect_callback
    handler, args = _extract_handler_and_args(obj_or_map, handler_name)
  File "/home/user/.local/lib/python3.6/site-packages/gi/overrides/Gtk.py", line 85, in _extract_handler_and_args
    raise AttributeError('Handler %s not found' % handler_name)
AttributeError: Handler on_edit_button_clicked not found
Traceback (most recent call last):
  File "/home/user/.local/lib/python3.6/site-packages/gi/overrides/Gtk.py", line 105, in _builder_connect_callback
    handler, args = _extract_handler_and_args(obj_or_map, handler_name)
  File "/home/user/.local/lib/python3.6/site-packages/gi/overrides/Gtk.py", line 85, in _extract_handler_and_args
    raise AttributeError('Handler %s not found' % handler_name)
AttributeError: Handler on_add_button_clicked not found
Traceback (most recent call last):
  File "/home/user/.local/lib/python3.6/site-packages/gi/overrides/Gtk.py", line 105, in _builder_connect_callback
    handler, args = _extract_handler_and_args(obj_or_map, handler_name)
  File "/home/user/.local/lib/python3.6/site-packages/gi/overrides/Gtk.py", line 85, in _extract_handler_and_args
    raise AttributeError('Handler %s not found' % handler_name)
AttributeError: Handler on_up_button_clicked not found
Traceback (most recent call last):
  File "/home/user/.local/lib/python3.6/site-packages/gi/overrides/Gtk.py", line 105, in _builder_connect_callback
    handler, args = _extract_handler_and_args(obj_or_map, handler_name)
  File "/home/user/.local/lib/python3.6/site-packages/gi/overrides/Gtk.py", line 85, in _extract_handler_and_args
    raise AttributeError('Handler %s not found' % handler_name)
AttributeError: Handler on_reload_now_clicked not found
Traceback (most recent call last):
  File "/home/user/.config/deluge/plugins/DefaultTrackers-0.4-py3.6.egg/defaulttrackers/gtk3ui.py", line 231, in on_add_button_clicked
  File "/home/user/.config/deluge/plugins/DefaultTrackers-0.4-py3.6.egg/defaulttrackers/gtk3ui.py", line 78, in show
AttributeError: 'NoneType' object has no attribute 'set_transient_for'
Traceback (most recent call last):
  File "/home/user/.local/lib/python3.6/site-packages/gi/overrides/Gtk.py", line 105, in _builder_connect_callback
    handler, args = _extract_handler_and_args(obj_or_map, handler_name)
  File "/home/user/.local/lib/python3.6/site-packages/gi/overrides/Gtk.py", line 85, in _extract_handler_and_args
    raise AttributeError('Handler %s not found' % handler_name)
AttributeError: Handler on_down_button_clicked not found
Traceback (most recent call last):
  File "/home/user/.local/lib/python3.6/site-packages/gi/overrides/Gtk.py", line 105, in _builder_connect_callback
    handler, args = _extract_handler_and_args(obj_or_map, handler_name)
  File "/home/user/.local/lib/python3.6/site-packages/gi/overrides/Gtk.py", line 85, in _extract_handler_and_args
    raise AttributeError('Handler %s not found' % handler_name)
AttributeError: Handler on_remove_button_clicked not found
Traceback (most recent call last):
  File "/home/user/.local/lib/python3.6/site-packages/gi/overrides/Gtk.py", line 105, in _builder_connect_callback
    handler, args = _extract_handler_and_args(obj_or_map, handler_name)
  File "/home/user/.local/lib/python3.6/site-packages/gi/overrides/Gtk.py", line 85, in _extract_handler_and_args
    raise AttributeError('Handler %s not found' % handler_name)
AttributeError: Handler on_edit_button_clicked not found
Traceback (most recent call last):
  File "/home/user/.local/lib/python3.6/site-packages/gi/overrides/Gtk.py", line 105, in _builder_connect_callback
    handler, args = _extract_handler_and_args(obj_or_map, handler_name)
  File "/home/user/.local/lib/python3.6/site-packages/gi/overrides/Gtk.py", line 85, in _extract_handler_and_args
    raise AttributeError('Handler %s not found' % handler_name)
AttributeError: Handler on_add_button_clicked not found
Traceback (most recent call last):
  File "/home/user/.local/lib/python3.6/site-packages/gi/overrides/Gtk.py", line 105, in _builder_connect_callback
    handler, args = _extract_handler_and_args(obj_or_map, handler_name)
  File "/home/user/.local/lib/python3.6/site-packages/gi/overrides/Gtk.py", line 85, in _extract_handler_and_args
    raise AttributeError('Handler %s not found' % handler_name)
AttributeError: Handler on_up_button_clicked not found
Traceback (most recent call last):
  File "/home/user/.local/lib/python3.6/site-packages/gi/overrides/Gtk.py", line 105, in _builder_connect_callback
    handler, args = _extract_handler_and_args(obj_or_map, handler_name)
  File "/home/user/.local/lib/python3.6/site-packages/gi/overrides/Gtk.py", line 85, in _extract_handler_and_args
    raise AttributeError('Handler %s not found' % handler_name)
AttributeError: Handler on_reload_now_clicked not found
Traceback (most recent call last):
  File "/home/user/.config/deluge/plugins/DefaultTrackers-0.4-py3.6.egg/defaulttrackers/gtk3ui.py", line 231, in on_add_button_clicked
  File "/home/user/.config/deluge/plugins/DefaultTrackers-0.4-py3.6.egg/defaulttrackers/gtk3ui.py", line 78, in show
AttributeError: 'NoneType' object has no attribute 'set_transient_for'

There's something wrong with your Python GTK wrapper. Why do you have Python modules installed in ~/.local?

I take that back. I do know why there's a deluge install in ~/.local: https://forum.deluge-torrent.org/viewtopic.php?t=55488, but to be honest, I don't remember what I did, I'd have to go back and re-read that post.

~/.local$ ll
total 28
drwx------  7 user user 4096 Mar  3 13:00 ./
drwxr-xr-x 83 user user 4096 Mar  3 23:34 ../
drwxrwxr-x  2 user user 4096 Mar  2 09:58 bin/
drwxr-xr-x  7 user user 4096 Oct 22  2019 deluge1/
drwxr-xr-x  3 user user 4096 Mar  3 13:00 include/
drwx------  3 user user 4096 Jan  2  2020 lib/
drwx------ 50 user user 4096 Mar  3 14:33 share/
~/.local$ ll bin
total 16
drwxrwxr-x 2 user user 4096 Mar  2 09:58 ./
drwx------ 7 user user 4096 Mar  3 13:00 ../
lrwxrwxrwx 1 user user   42 Oct 26  2019 deluge1 -> /home/user/.local/deluge1/bin/deluge-gtk*
-rwxr-xr-x 1 user user  228 Mar  2 09:58 ffmpeg-normalize*
-rwxr-xr-x 1 user user  211 Mar  2 09:58 tqdm*

Fixed. It was an issue with Gtk3 missing an "*.ui" file.