Bug 199629 - ImportError: cannot import name _gtk
Summary: ImportError: cannot import name _gtk
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: pygtk2
Version: rawhide
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: John (J5) Palmieri
QA Contact:
URL:
Whiteboard:
: 200092 (view as bug list)
Depends On:
Blocks: FC6Target FC6Desktop
TreeView+ depends on / blocked
 
Reported: 2006-07-20 20:30 UTC by Nicolas Mailhot
Modified: 2013-03-13 04:51 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-07-28 03:20:48 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
GNOME Bugzilla 348691 0 None None None Never

Description Nicolas Mailhot 2006-07-20 20:30:26 UTC
Description of problem:
$ system-config-display 
Traceback (most recent call last):
  File "/usr/share/system-config-display/xconf.py", line 364, in ?
    reload(gtk)        
  File "/usr/lib64/python2.4/site-packages/gtk-2.0/gtk/__init__.py", line 40, in ?
    from gtk import _gtk
ImportError: cannot import name _gtk

Version-Release number of selected component (if applicable):

gtk2-2.10.0.x86_64
gtk2-2.10.0.i386
system-config-display-1.0.37.noarch
pygtk2-2.9.3.x86_64

Comment 1 Ray Strode [halfline] 2006-07-25 20:20:19 UTC
so the real problem is pygtk's initialization code can't handle being called twice.

if you:

import gtk
and then
reload(gtk)

it fails. Or you if you make import gtk fail initially then it won't work later
when it should:
os.environ["DISPLAY"] = "junk"
import gtk
os.environ["DISPLAY"] = ":0"
import gtk

Comment 2 Matthias Clasen 2006-07-27 13:49:41 UTC
*** Bug 200092 has been marked as a duplicate of this bug. ***

Comment 3 Alexander Larsson 2006-07-28 02:16:52 UTC
pygtk2-2.9.3-3 is building with a fix.


Comment 4 Matthias Clasen 2006-07-28 03:20:48 UTC
fix is in rawhide


Note You need to log in before you can comment on or make changes to this bug.