简体   繁体   中英

Importing WebKit causes application to fail at start-up.

I'm making an application using Quickly, and I want to add a Webkit widget to my window. I thought "Should be easy enough", but as always, it couldn't be that easy.

From the moment I add import webkit , the application fails to start.

robin@RobinJ:~/Ubuntu One/Python/gtkreddit$ quickly run
/usr/lib/python2.7/dist-packages/gobject/constants.py:24: Warning: g_boxed_type_register_static: assertion `g_type_from_name (name) == 0' failed
  import gobject._gobject
/usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:40: Warning: specified class size for type `PyGtkGenericCellRenderer' is smaller than the parent type's `GtkCellRenderer' class size
  from gtk import _gtk
/usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:40: Warning: g_type_get_qdata: assertion `node != NULL' failed
  from gtk import _gtk

The entire source code can be found here . The specific file I'm talking about, is this one .

It seems you are mixing bindings. If you are already using GObject Introspection, then stay with that. Try:

from gi.repository import WebKit

or use the old bindings for GTK (pygtk).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM