Bug 199629 - ImportError: cannot import name _gtk
ImportError: cannot import name _gtk
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: pygtk2 (Show other bugs)
rawhide
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: John (J5) Palmieri
:
: 200092 (view as bug list)
Depends On:
Blocks: FC6Target FC6Desktop
  Show dependency treegraph
 
Reported: 2006-07-20 16:30 EDT by Nicolas Mailhot
Modified: 2013-03-13 00:51 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-07-27 23:20:48 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
GNOME Desktop 348691 None None None Never

  None (edit)
Description Nicolas Mailhot 2006-07-20 16:30:26 EDT
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 16:20:19 EDT
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 09:49:41 EDT
*** Bug 200092 has been marked as a duplicate of this bug. ***
Comment 3 Alexander Larsson 2006-07-27 22:16:52 EDT
pygtk2-2.9.3-3 is building with a fix.
Comment 4 Matthias Clasen 2006-07-27 23:20:48 EDT
fix is in rawhide

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