Opened 5 years ago
Closed 5 years ago
#3328 closed bug (Fixed)
GLib.io_add_watch error
Reported by: | Gregorio Litenstein | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | not applicable |
Component: | Packaging | Version: | 2.0.3 |
Keywords: | twisted gtk crash TypeError glib2 gobject gio gir | Cc: |
Description
I'm trying to make a viable mac bundle (and hopefully once that is done, a script to reliably produce them)
So far, I'm stuck and Deluge won't run; I'm getting the following error,
Traceback (most recent call last): File "/opt/deluge/packaging/osx/app/Deluge.app/Contents/MacOS/Deluge-bin", line 11, in <module> load_entry_point('deluge==2.0.3', 'gui_scripts', 'deluge-gtk')() File "/opt/deluge/packaging/osx/app/Deluge.app/Contents/Resources/lib/python3.6/deluge-2.0.3-py3.6.egg/deluge/ui/gtk3/__init__.py", line 63, in start Gtk().start() File "/opt/deluge/packaging/osx/app/Deluge.app/Contents/Resources/lib/python3.6/deluge-2.0.3-py3.6.egg/deluge/ui/gtk3/__init__.py", line 43, in start from .gtkui import GtkUI File "/opt/deluge/packaging/osx/app/Deluge.app/Contents/Resources/lib/python3.6/deluge-2.0.3-py3.6.egg/deluge/ui/gtk3/gtkui.py", line 33, in <module> reactor = gtk3reactor.install() File "twisted/internet/gtk3reactor.pyc", line 71, in install File "twisted/internet/gtk3reactor.pyc", line 50, in __init__ File "twisted/internet/gireactor.pyc", line 117, in __init__ File "twisted/internet/_glibbase.pyc", line 109, in __init__ File "twisted/internet/base.pyc", line 512, in __init__ File "twisted/internet/posixbase.pyc", line 286, in installWaker File "twisted/internet/_glibbase.pyc", line 197, in addReader File "twisted/internet/_glibbase.pyc", line 188, in _add File "twisted/internet/_glibbase.pyc", line 162, in input_add TypeError: GLib.io_add_watch() got multiple values for keyword argument 'priority'
Technically I guess it might actually Twisted's fault but there is one thing that bugs me... if I run Deluge in ubuntu, I don't have that issue... I've even tried matching the versions of twisted and other dependencies on my environment (and subsequently bundle) to what is included in the official canonical repos but I still get that error.
Over at twisted, _glybbase.py hasn't been touched in three years. So, there must be _something_ deluge does different in linux and mac that works fine on one and triggers that error on the other? Maybe it's a quartz vs x11 issue? I don't know.
P.S. I've also tried with both Python 3.7 and 3.6.
Change History (8)
comment:1 by , 5 years ago
Component: | Unknown → Packaging |
---|---|
Milestone: | needs verified → not applicable |
comment:2 by , 5 years ago
I have tried both 3.34 and 3.28; coupled with Twisted 19.10, 19.7, 18.9 and 17.5 So far all have produced the same result. I have detected a potential issue with gtk-osx-application(macports-side) that I'm currently working on solving (no idea if it could be related though)
I plan eventually to put the whole thing through a debugger once I'm done with that kn case I can get some insight but I've never used pdb so 🤷🏼♂️
comment:3 by , 5 years ago
Can you test from a Python prompt that the function call will accept the old-style arguments?
e.g.
from gi import version_info version_info from gi.repository import GLib GLib.io_add_watch(1,GLib.IOCondition(1),print,priority=1)
I get:
>>> version_info (3, 34, 0) >>> GLib.io_add_watch(1,GLib.IOCondition(1),print,priority=1) 1
I don't think a debugger would provide any more information so perhaps if you are still facing this issue ask the PyGobject or Twisted devs for their thoughts.
For reference there is an old Twisted ticket about this: https://twistedmatrix.com/trac/ticket/6369 but since pygobject shims this function it was never fixed in twisted.
comment:4 by , 5 years ago
Will try it when I got some time (tonight or tomorrow). I also opened a new ticket over at twisted and referenced that and another one but so far there's no answer.
The reason I think a debugger might help is... I tried using the same versions as packaged in Ubuntu (where deluge works) and ran into the error. So, I figure there might be a branch somewhere in the code that triggers the error in my version and not that one (or apparently, homebrew's either)
follow-up: 6 comment:5 by , 5 years ago
So... I just tried it, definitely appears to be a packaging issue; using python3 from the macports prefix works fine; but using the python executable insie my bundle throws the error.
comment:6 by , 5 years ago
Replying to Lord-Kamina:
So... I just tried it, definitely appears to be a packaging issue; using python3 from the macports prefix works fine; but using the python executable insie my bundle throws the error.
And, adding
packages = gi
to setup.cfg seems to have fixed that; I'm now getting a different error:
(Deluge-bin:62329): Gtk-WARNING **: 15:58:51.386: Locale not supported by C library. Using the fallback 'C' locale. Trace/BPT trap: 5
Which seems pretty generic but I expect the solution will most likely be the same: Some nondescript module dependence py2app failed to pick-up.
comment:8 by , 5 years ago
Resolution: | → Fixed |
---|---|
Status: | new → closed |
That is quite odd, looking at the source code for pygobject, it should handle that usage by twisted: https://gitlab.gnome.org/GNOME/pygobject/blob/3.34.0/gi/overrides/GLib.py#L612
What version of pygobject are you using?