[GtkGLExt] Pygtkglext issues - importerrors, segfault (possibly related?) using 1.1.0.



Hey-ho People!

Trying to get the python bindings to work, but can't even import them. At first, I thought it was a path error, but it seems not. If I don't do anything after installing, and try to import gtk, gtk.gtkgl , python cannot find the module.
I add site-packages/gtk-2.0/gtk to sys.path and the same happens, but if I just import gtkgl, then I get a fatal python error, "can't initialize module gtk.gtkgl."

I did a quick grep, and changed the relevant line of code at the end of glmodule.c to PyErr_Print(), doing the same, I get:

>>> import gtkgl
ImportError: could not import gtk.gdkgl
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/python2.4/site-packages/gtk- 2.0/gtk/gtkgl/__init__.py", line 22, in ?
    from widget import *
  File "/usr/lib/python2.4/site-packages/gtk-2.0/gtk/gtkgl/widget.py", line 25, in ?
    class Widget(object):
  File "/usr/lib/python2.4/site-packages/gtk- 2.0/gtk/gtkgl/widget.py", line 32, in Widget
    def set_gl_capability(self, glconfig, share_list=None, direct=True,
AttributeError: 'module' object has no attribute 'gdkgl'

Not sure, but I assume this is the same thing - we still aren't finding gtk.<foo> for some reason. Having done a bit of reading, I added a blank file, __init__.py to site-packages/gtk- 2.0/gtk. Now, when I import gtkgl any way, python segfaults.

Here's a not probably very helpful backtrace:

(gdb) bt
#0  0xa75a9a67 in gdk_x11_display_get_xdisplay () from /usr/lib/libgdk-x11-2.0.so.0
#1  0xa7a8bea8 in gdk_gl_init_check (argc=0xaf8b2ee8, argv=0xaf8b2ee4) at gdkglinit.c:209
#2  0xa7efa7dc in gtk_gl_init_check (argc=0xaf8b2ee8, argv=0xaf8b2ee4) at gtkglinit.c:194
#3  0xa7efe255 in init_gtkgl () at gtkglmodule.c:59
#4  0x080d621c in _PyImport_LoadDynamicModule ()
#5  0x080d4255 in PyImport_ExecCodeModule ()
#6  0x080d4979 in PyImport_ReloadModule ()
#7  0x080d4e21 in PyImport_ReloadModule ()
#8  0x080d502e in PyImport_ImportModuleEx ()
#9  0x080afd41 in _PyBuiltin_Init ()
#10 0x08058987 in PyObject_Call ()
#11 0x080b3bdd in PyEval_CallObjectWithKeywords ()
#12 0x080b7980 in PyEval_EvalFrame ()
#13 0x080ba6b5 in PyEval_EvalCodeEx ()
#14 0x080ba719 in PyEval_EvalCode ()
#15 0x080d385c in PyImport_ExecCodeModuleEx ()
#16 0x080d3ed1 in PyImport_ExecCodeModule ()
#17 0x080d5796 in PyImport_ImportModule ()
#18 0x080d4979 in PyImport_ReloadModule ()
#19 0x080d4e21 in PyImport_ReloadModule ()
#20 0x080d506d in PyImport_ImportModuleEx ()
#21 0x080afd41 in _PyBuiltin_Init ()
#22 0x08058987 in PyObject_Call ()
#23 0x080b3bdd in PyEval_CallObjectWithKeywords ()
#24 0x080b7980 in PyEval_EvalFrame ()
#25 0x080ba6b5 in PyEval_EvalCodeEx ()
#26 0x080ba719 in PyEval_EvalCode ()
#27 0x080dc815 in PyRun_InteractiveOneFlags ()
#28 0x080dc930 in PyRun_InteractiveLoopFlags ()
#29 0x080dd4a2 in PyRun_AnyFileExFlags ()
#30 0x08055ba8 in Py_Main ()
#31 0x08055032 in main ()

Running debian etch with python2.4, pygtk 2.8.6, [py]gtkglext 1.1.0. I also tried with the .deb of 1.0.6, but not as thoroughly.

--
The C@ S@ on the M@

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]