Error about some Gdk.Rectangle

78 views
Skip to first unread message

Elvis Sikora

unread,
Jun 18, 2016, 7:41:14 PM6/18/16
to BeeWare Users
Hi! I use Conda to manage Python install. I use Arch. I just installed toga using pip + symlinking gi. When I try running toga-demo, I get the following error:
 
% toga-demo
** (toga-demo:30460): WARNING **: Couldn't register with accessibility bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
/home/elvis/miniconda3/envs/toga/lib/python2.7/site-packages/toga_gtk/app.py:6: 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, Gio, GLib
Traceback (most recent call last):
  File "/home/elvis/miniconda3/envs/toga/lib/python2.7/site-packages/toga_gtk/widgets/container.py", line 61, in do_size_allocate
    widget._impl.size_allocate(child_allocation)
TypeError: argument allocation: Expected Gdk.Rectangle, but got gi.repository.cairo.RectangleInt
Traceback (most recent call last):
  File "/home/elvis/miniconda3/envs/toga/lib/python2.7/site-packages/toga_s/container.py", line 61, in do_size_allocate
    widget._impl.size_allocate(child_allocation)
TypeError: argument allocation: Expected Gdk.Rectangle, but got gi.repositRectangleInt
/home/elvis/miniconda3/envs/toga/bin/python: symbol lookup error: /usr/libso.0: undefined symbol: cairo_surface_set_device_scale

I tried the usual response for these situations: googling around for similar errors. Well, even though I could find similar cases, none of those applied to mine. Some recommended upgrading cairo to >= 1.14, which mine already was. Some recommended getting rid of Ubuntu-patched Cairo and installing the original one. Mine already is it.

If anyone can help me figure this out, I'd be glad. Thanks for your attention!

Russell Keith-Magee

unread,
Jun 18, 2016, 7:59:39 PM6/18/16
to beewar...@googlegroups.com
Hi Elvis,

That’s certainly an odd one. I can’t say I have a lot of knowledge about what Conda does differently; but the red flag for me is the message about Gtk 3.0, and then python 2.7 in the stack trace. 

IIRC, Arch uses Python 3 by default; however, it looks like you’re running Python 2.7 in your Conda instance. If this is the case, that would be a very likely source of the error.

Yours,
Russ Magee %-)
Reply all
Reply to author
Forward
0 new messages