GNOME Bugzilla – Bug 728909
Python bindings broken in Ubuntu Trusty
Last modified: 2014-04-25 20:16:48 UTC
Hmmmm, unfortunately I haven't had a lot of time to work on this recently, and in my absence the python bindings have bitrotted beyond the point of usability in Ubuntu Trusty. I've attached a patch that fixes it. This is untested on anything other than Ubuntu Trusty.
Created attachment 275084 [details] [review] Fix GExiv2.py for Ubuntu Trusty
Robert, looking at the Launchpad ticket it appears this is to fix a problem with Trusty. Will this patch adversely affect Saucy users? Can you describe a use case / attach a script which demonstrates the problem for me? I know this affects every Python app using gexiv2, so maybe you can tell me which app to use (steps, etc.) so I can see the failure.
Test case can be as simple as this in a terminal: $ python3 Python 3.4.0 (default, Apr 11 2014, 13:05:11) [GCC 4.8.2] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from gi.repository import GExiv2 >>> m = GExiv2.Metadata('IMG_2411.JPG') Traceback (most recent call last):
+ Trace 233518
Alternately, you can launch GottenGeography and try to load a picture: it crashes with this traceback: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/gg/app.py", line 53, in command_line self.open_files([abspath(f) for f in files]) File "/usr/lib/python3/dist-packages/gg/app.py", line 168, in open_files Photograph.load_from_file(name) File "/usr/lib/python3/dist-packages/gg/common.py", line 148, in __call__ return self.func(*args, **kwargs) File "/usr/lib/python3/dist-packages/gg/photos.py", line 184, in load_from_file photo = Photograph(uri) File "/usr/lib/python3/dist-packages/gg/common.py", line 123, in memoizer cache[key] = obj(*args, **kwargs) File "/usr/lib/python3/dist-packages/gg/photos.py", line 215, in __init__ self.thumb = fetch_thumbnail(filename) File "/usr/lib/python3/dist-packages/gg/photos.py", line 107, in fetch_thumbnail exif = GExiv2.Metadata(filename) TypeError: GObject.__init__() takes exactly 0 arguments (1 given) (exact same crash, just longer traceback to get to the gexiv2 bit of code). This crash is essentially equivalent to when the python bindings were new, and the debian package failed to ship the GExiv2.py file. The overrides just aren't working, it's as if they're not even there. I've taken the time to test this on Ubuntu Saucy and this patch seems to have no effect (eg, Saucy works fine with or without this patch, but Trusty needs this patch to work).
Thanks Robert! Pushed to master, commit 7454eeb I'll release a 0.10.1 shortly.
Thanks Jim.