-------- Original-Nachricht --------
> Datum: Sat, 05 May 2012 15:44:42 +0200
> Von: Jean Brefort <[email protected]>
> An: [email protected]
> CC: [email protected]
> Betreff: Re: using python: crash, when importing gtk

> Le vendredi 04 mai 2012 à 07:32 +0200, [email protected] a écrit :
> > -------- Original-Nachricht --------
> > > Datum: Wed, 02 May 2012 14:06:41 +0200
> > > Von: "Jean Bréfort" <[email protected]>
> > > An: [email protected]
> > > CC: [email protected]
> > > Betreff: Re: using python: crash, when importing gtk
> > 
> > > 1.11.3 should NOT build with Python support. It should fail at
> configure
> > > stage.
> > > 
> > Hello Jean, I don't understand why.
> 
> It should fail because things can't work currently. It does not fail
> actually, and this is a bug.
> 
> > > You are using pygtk which depends on gtk+-2.0 from a gtk+-3.0 program,
> > > so the crash is anticipated.
> > > 
> > 
> > I tried using PyGI instead. A dialog appears, but then, after pressing
> the ok button, gnumeric hangs.
> > 
> > gnumeric
> > 
> > /usr/lib/python2.7/dist-packages/gi/_gobject/constants.py:24: Warning:
> g_boxed_type_register_static: assertion `g_type_from_name (name) == 0'
> failed
> >   from . import _gobject
> 
> Hmm, this is clearly a bug. Something tries to initialize gobject type a
> second time, and, of course, this fails. I'm suspecting this occurs
> during gnm_python_init() execution. This code needs much love in order
> to work. It currently imports pygtk wich is not compatible with gtk-3.
> 

I don't know, if it is related to that. Similar things happen in 1.10.17 with 
gtk2.

I have two python pugins, each of them imports gtk. The first plugin works 
fine, but if I start the second one (both plugins are "gui" plugins, then a 
traceback appears)

import pygtk

pygtk.require('2.0')

import gtk
import Gnumeric ...

Traceback (most recent call last):
  File "transpose", line 17, in <module>
  File "/usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py", line 42, in 
<module>
    import gdk
ImportError: No module named gdk
E Execution of module "transpose" failed.
^[[A
** (gnumeric:2108): CRITICAL **: gplp_unload_service_function_group: assertion 
`IS_GNM_PLUGIN_SERVICE_FUNCTION_GROUP (service)' failed

If I start plugin A (starts ok), then plugin B will fail. If I restart 
Gnumeric, first start plugin B (works ok), then launching plugin A will fail 
again with the traceback message above. 

Do you know a fix or workaround for the buggy behaviour?

regards,
-- 
NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone!                          
        
Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a
_______________________________________________
gnumeric-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gnumeric-list

Reply via email to