Python plugin: import gtk a second time fail
Submitted by scr..@..gmx.at
Link to original bug (#675698)
Description
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))
Version: 1.10.x