Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Couldn't find foreign struct converter for 'cairo.Context' #8

Closed
aldokkani opened this issue Sep 15, 2017 · 2 comments
Closed

Comments

@aldokkani
Copy link

When I run utils_gui/image_viewer.py script this is what I get:

python utils_gui/image_viewer.py 
/home/daniel/helit/utils_gui/viewer.py:16: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
  from gi.repository import Gtk, Gdk, GdkPixbuf
TypeError: Couldn't find foreign struct converter for 'cairo.Context'
TypeError: Couldn't find foreign struct converter for 'cairo.Context'
TypeError: Couldn't find foreign struct converter for 'cairo.Context'
TypeError: Couldn't find foreign struct converter for 'cairo.Context'

And it opens a blank image.

I'm running the code on ubuntu 17.04 x64

Would appreciate any type of help.

@thaines
Copy link
Owner

thaines commented Sep 16, 2017

That probably means you need to install the python gobject interface for cairo. Google suggests either 'sudo apt-get install python-gobject-cairo' or 'sudo apt-get install python-gi-cairo' should work.

@aldokkani
Copy link
Author

It worked with sudo apt-get install python-gi-cairo. Thanks Tom.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants