GNOME Bugzilla – Bug 723974
Errors while searching (cairo.Context TypeError)
Last modified: 2014-02-10 21:58:05 UTC
Created attachment 268596 [details] Subtitles file (example) This happens a lot, whatever the subtitle file is (however, it is always a .srt if that means anything) but I provided an example in attached files… Please find the traceback below. I don't know what other data I could provide so please feel free to contact me if needed. Traceback File: /usr/share/gaupol/gaupol/dialogs/search.py Line: 338 In: _on_text_buffer_changed self._replace_button.set_sensitive(False) TypeError: Couldn't find conversion for foreign struct 'cairo.Context' Environment Platform: Linux-3.11.0-14-generic-x86_64-with-Ubuntu-13.10-saucy Locale: fr_FR.utf_8 Libraries Python: 3.3.2 GTK+: 3.8.6 PyGObject: 3.10.0 GStreamer: 1.2.0.0 Python Packages aeidon: 0.24 gaupol: 0.24 enchant: 1.6.5 gtkspellcheck: 3.0 chardet: 2.0.1
It seems you need to install package "python3-gi-cairo". I can reproduce this bug on my Debian unstable system only once I uninstall that package. (Thanks to Paperwork guys for figuring this out [1].) It seems Gaupol is using cairo via a deprecated function Gtk.paint_layout and I should switch to Gtk.render_layout. I'll fix that soonish and see if it solves this problem as well. Gaupol doesn't have any explicit dependency on cairo and you shouldn't need to manually install packages. [1] https://github.com/jflesch/paperwork/issues/283
(In reply to comment #1) > It seems you need to install package "python3-gi-cairo". I can reproduce this > bug on my Debian unstable system only once I uninstall that package. (Thanks to > Paperwork guys for figuring this out [1].) > > It seems Gaupol is using cairo via a deprecated function Gtk.paint_layout and I > should switch to Gtk.render_layout. I'll fix that soonish and see if it solves > this problem as well. Gaupol doesn't have any explicit dependency on cairo and > you shouldn't need to manually install packages. > > [1] https://github.com/jflesch/paperwork/issues/283 Indeed, I just installed the package and it looks like there is no issue anymore. Glad that'll be fixed. BTW, the software is really great !
I fixed those deprecated functions [1], but it makes no difference for this bug. I think I'll ask the Debian packager. [1] https://github.com/otsaloma/gaupol/commit/e267eadd431617161d2b497dc9040c544d365da3
Filed downstream as a bug in the Debian package. python3-gi-cairo is a binary built from PyGObject, so this should be Debian-specific, related to to how they split PyGObject to multiple binaries and which of those one should depend on. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=738582