After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 728909 - Python bindings broken in Ubuntu Trusty
Python bindings broken in Ubuntu Trusty
Status: RESOLVED FIXED
Product: gexiv2
Classification: Other
Component: bindings
0.10.x
Other Linux
: Urgent critical
: 0.10.1
Assigned To: Gexiv2 Maintainers
Gexiv2 Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-04-24 21:12 UTC by Robert Bruce Park
Modified: 2014-04-25 20:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix GExiv2.py for Ubuntu Trusty (1.25 KB, patch)
2014-04-24 21:13 UTC, Robert Bruce Park
none Details | Review

Description Robert Bruce Park 2014-04-24 21:12:11 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.
Comment 1 Robert Bruce Park 2014-04-24 21:13:03 UTC
Created attachment 275084 [details] [review]
Fix GExiv2.py for Ubuntu Trusty
Comment 2 Jim Nelson 2014-04-25 01:50:17 UTC
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.
Comment 3 Robert Bruce Park 2014-04-25 03:40:18 UTC
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):
  • File "<stdin>", line 1 in <module>
TypeError: GObject.__init__() takes exactly 0 arguments (1 given)

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).
Comment 4 Jim Nelson 2014-04-25 19:25:18 UTC
Thanks Robert!  Pushed to master, commit 7454eeb

I'll release a 0.10.1 shortly.
Comment 5 Robert Bruce Park 2014-04-25 20:16:48 UTC
Thanks Jim.