After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 675698 - Python plugin: import gtk a second time fail
Python plugin: import gtk a second time fail
Status: RESOLVED OBSOLETE
Product: Gnumeric
Classification: Applications
Component: General
1.10.x
Other Linux
: Normal normal
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on: 670271
Blocks:
 
 
Reported: 2012-05-08 18:38 UTC by scrutinizer
Modified: 2018-05-22 13:50 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description scrutinizer 2012-05-08 18:38:53 UTC
I have two python pugins, each of them imports gtk.
The first plugin (A) works fine, but if I start the second one (B) (both plugins are "gui" plugins), then a traceback appears:

Plugin A (short as possible example)

import pygtk

pygtk.require('2.0')

import gtk

import Gnumeric

def copy_from_above(gui):
    pass

fill_from_above_ui_actions = {
    'Copy_from_above':   copy_from_above
}

Similar is Plugin B

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.

** (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.

Is in 1.10.17 AND in 1.11.3 (in 1.11.3 with PyGI (from gi.repository import Gtk))
Comment 1 Jean Bréfort 2012-07-11 15:46:27 UTC
Well, this is certainly a consequence of the use of both gtk versions. You might try with the patch attached to #670271, it might fix your issue as well.
Comment 2 GNOME Infrastructure Team 2018-05-22 13:50:37 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnumeric/issues/187.