Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#5244 - pygtk 2.8.6-3 breaks apps

Attached to Project: Arch Linux
Opened by Eyolf Østrem (eyolf) - Friday, 18 August 2006, 14:45 GMT
Task Type Bug Report
Category Packages: Current
Status Closed
Assigned To No-one
Architecture not specified
Severity Medium
Priority Normal
Reported Version 0.7.2 Gimmick
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

After installing pygtk 2.8.6-3, several of my python-based apps stopped working. First, it was just Gourmet, but I didn't care so much - it had given me problems before. But when the second app, gramps this time, stopped working, I started checking. The error message was this:

eyolf[~]% gramps Fri 18 Aug 16:01:40
Traceback (most recent call last):
File "/usr/share/gramps/gramps.py", line 43, in ?
import gtk.gdk
ImportError: No module named gtk.gdk


The relevant section in the mentioned file reads:

#-------------------------------------------------------------------------
#
# pygtk
#
#-------------------------------------------------------------------------
try:
import pygtk
pygtk.require('2.0')
except ImportError:
pass

import gtk.gdk
import gtk
import gtk.glade


When I downgraded to v. 2.8.6-1, both these apps work as normal again.
This task depends upon

Closed by  Jan de Groot (JGC)
Saturday, 19 August 2006, 11:44 GMT
Reason for closing:  Works for me
Additional comments about closing:  Bug itself is fixed, the pacman file move bug has been reported in another bugreport.
Comment by Jan de Groot (JGC) - Friday, 18 August 2006, 15:02 GMT
From the CVS changelogs:
upgpkg: pygtk 2.8.6-2
Depend on latest pycairo to pull in python-numeric as dependency

Did you force downgrade to cairo 1.0.4 and is your pycairo uptodate?
Comment by Eyolf Østrem (eyolf) - Friday, 18 August 2006, 15:15 GMT
No downgrade this time. I was having problems in the previous round re. cairo (with the antialiasing of gtk apps under KDE), but that was fixed, and my cairo v. is 1.2.2-1 (and pycairo 1.2.0-1)
Comment by Jan de Groot (JGC) - Friday, 18 August 2006, 17:14 GMT
Could you try to reinstall pygobject and pygtk and try again?
Comment by Eyolf Østrem (eyolf) - Saturday, 19 August 2006, 00:15 GMT
Sorry - no luck. Same result:

eyolf[~]% gramps Sat 19 Aug 01:48:15
Traceback (most recent call last):
File "/usr/share/gramps/gramps.py", line 43, in ?
import gtk.gdk
ImportError: No module named gtk.gdk
eyolf[~]% gourmet Sat 19 Aug 02:12:37
Traceback (most recent call last):
File "/usr/bin/gourmet", line 13, in ?
from gourmet.OptionParser import *
File "/usr/lib/python2.4/site-packages/PIL/__init__.py", line 10, in ?
#
File "/home/will/community/gnome/gourmet/pkg/usr/lib/python2.4/site-packages/gourmet/gglobals.py", line 1, in ?
ImportError: No module named gobject
Comment by Jan de Groot (JGC) - Saturday, 19 August 2006, 09:13 GMT
Try running python with -v and then import the modules by hand, it should give more information.
Comment by Eyolf Østrem (eyolf) - Saturday, 19 August 2006, 09:26 GMT
It certainly did:


eyolf[~]% python -v
#installing zipimport hook
import zipimport # builtin
# installed zipimport hook
# # /usr/lib/python2.4/site.pyc matches /usr/lib/python2.4/site.py
# import site # precompiled from /usr/lib/python2.4/site.pyc
# # /usr/lib/python2.4/os.pyc matches /usr/lib/python2.4/os.py
# import os # precompiled from /usr/lib/python2.4/os.pyc
# import posix # builtin
# # /usr/lib/python2.4/posixpath.pyc matches /usr/lib/python2.4/posixpath.py
# import posixpath # precompiled from /usr/lib/python2.4/posixpath.pyc
# # /usr/lib/python2.4/stat.pyc matches /usr/lib/python2.4/stat.py
# import stat # precompiled from /usr/lib/python2.4/stat.pyc
# # /usr/lib/python2.4/UserDict.pyc matches /usr/lib/python2.4/UserDict.py
# import UserDict # precompiled from /usr/lib/python2.4/UserDict.pyc
# # /usr/lib/python2.4/copy_reg.pyc matches /usr/lib/python2.4/copy_reg.py
# import copy_reg # precompiled from /usr/lib/python2.4/copy_reg.pyc
# # /usr/lib/python2.4/types.pyc matches /usr/lib/python2.4/types.py
# import types # precompiled from /usr/lib/python2.4/types.pyc
# # /usr/lib/python2.4/warnings.pyc matches /usr/lib/python2.4/warnings.py
# import warnings # precompiled from /usr/lib/python2.4/warnings.pyc
# # /usr/lib/python2.4/linecache.pyc matches /usr/lib/python2.4/linecache.py
# import linecache # precompiled from /usr/lib/python2.4/linecache.pyc
# import encodings # directory /usr/lib/python2.4/encodings
# # /usr/lib/python2.4/encodings/__init__.pyc matches /usr/lib/python2.4/encodings/__init__.py
# import encodings # precompiled from /usr/lib/python2.4/encodings/__init__.pyc
# # /usr/lib/python2.4/codecs.pyc matches /usr/lib/python2.4/codecs.py
# import codecs # precompiled from /usr/lib/python2.4/codecs.pyc
# import _codecs # builtin
# # /usr/lib/python2.4/encodings/aliases.pyc matches /usr/lib/python2.4/encodings/aliases.py
# import encodings.aliases # precompiled from /usr/lib/python2.4/encodings/aliases.pyc
# # /usr/lib/python2.4/encodings/latin_1.pyc matches /usr/lib/python2.4/encodings/latin_1.py
# import encodings.latin_1 # precompiled from /usr/lib/python2.4/encodings/latin_1.pyc
# Python 2.4.3 (#1, May 29 2006, 22:23:40)
# [GCC 4.1.1] on linux2
# Type "help", "copyright", "credits" or "license" for more information.
# dlopen("/usr/lib/python2.4/lib-dynload/readline.so", 2);
# import readline # dynamically loaded from /usr/lib/python2.4/lib-dynload/readline.so
# >>> import gtk.gkd
# import gtk # directory /usr/lib/python2.4/site-packages/gtk-2.0/gtk
# # /usr/lib/python2.4/site-packages/gtk-2.0/gtk/__init__.pyc matches /usr/lib/python2.4/site-packages/gtk-2.0/gtk/__init__.py
# import gtk # precompiled from /usr/lib/python2.4/site-packages/gtk-2.0/gtk/__init__.pyc
# dlopen("/usr/lib/python2.4/site-packages/gtk-2.0/gobject.so", 2);
# import gobject # dynamically loaded from /usr/lib/python2.4/site-packages/gtk-2.0/gobject.so
# dlopen("/usr/lib/python2.4/site-packages/gtk-2.0/gtk/_gtk.so", 2);
# import cairo # directory /usr/lib/python2.4/site-packages/cairo
# # /usr/lib/python2.4/site-packages/cairo/__init__.pyc matches /usr/lib/python2.4/site-packages/cairo/__init__.py
# import cairo # precompiled from /usr/lib/python2.4/site-packages/cairo/__init__.pyc
# dlopen("/usr/lib/python2.4/site-packages/cairo/_cairo.so", 2);
# import cairo._cairo # dynamically loaded from /usr/lib/python2.4/site-packages/cairo/_cairo.so
# # /usr/lib/python2.4/encodings/utf_8.pyc matches /usr/lib/python2.4/encodings/utf_8.py
# import encodings.utf_8 # precompiled from /usr/lib/python2.4/encodings/utf_8.pyc
# dlopen("/usr/lib/python2.4/site-packages/gtk-2.0/pango.so", 2);
# import pango # dynamically loaded from /usr/lib/python2.4/site-packages/gtk-2.0/pango.so
# dlopen("/usr/lib/python2.4/site-packages/gtk-2.0/atk.so", 2);
# import atk # dynamically loaded from /usr/lib/python2.4/site-packages/gtk-2.0/atk.so
# dlopen("/usr/lib/python2.4/site-packages/gtk-2.0/pangocairo.so", 2);
# import pangocairo # dynamically loaded from /usr/lib/python2.4/site-packages/gtk-2.0/pangocairo.so
# import gtk._gtk # dynamically loaded from /usr/lib/python2.4/site-packages/gtk-2.0/gtk/_gtk.so
# # /usr/lib/python2.4/site-packages/gtk-2.0/gtk/keysyms.pyc matches /usr/lib/python2.4/site-packages/gtk-2.0/gtk/keysyms.py
# import gtk.keysyms # precompiled from /usr/lib/python2.4/site-packages/gtk-2.0/gtk/keysyms.pyc
# Traceback (most recent call last):
# File "<stdin>", line 1, in ?
# ImportError: No module named gkd
# >

Comment by Jan de Groot (JGC) - Saturday, 19 August 2006, 09:58 GMT
The module is named gdk, not gkd ;)
Comment by Eyolf Østrem (eyolf) - Saturday, 19 August 2006, 10:11 GMT
Dammit, it's too early in the morning. My fingers weren't awake yet.
Besides, I still had the old version of pygtk installed. When I typed gtk.gdk, it worked...
Anyway, another try, this time with 2.8.6-3 properly installed:

eyolf[~]% python -v Sat 19 Aug 12:06:01
# installing zipimport hook
import zipimport # builtin
# installed zipimport hook
# /usr/lib/python2.4/site.pyc matches /usr/lib/python2.4/site.py
import site # precompiled from /usr/lib/python2.4/site.pyc
# /usr/lib/python2.4/os.pyc matches /usr/lib/python2.4/os.py
import os # precompiled from /usr/lib/python2.4/os.pyc
import posix # builtin
# /usr/lib/python2.4/posixpath.pyc matches /usr/lib/python2.4/posixpath.py
import posixpath # precompiled from /usr/lib/python2.4/posixpath.pyc
# /usr/lib/python2.4/stat.pyc matches /usr/lib/python2.4/stat.py
import stat # precompiled from /usr/lib/python2.4/stat.pyc
# /usr/lib/python2.4/UserDict.pyc matches /usr/lib/python2.4/UserDict.py
import UserDict # precompiled from /usr/lib/python2.4/UserDict.pyc
# /usr/lib/python2.4/copy_reg.pyc matches /usr/lib/python2.4/copy_reg.py
import copy_reg # precompiled from /usr/lib/python2.4/copy_reg.pyc
# /usr/lib/python2.4/types.pyc matches /usr/lib/python2.4/types.py
import types # precompiled from /usr/lib/python2.4/types.pyc
# /usr/lib/python2.4/warnings.pyc matches /usr/lib/python2.4/warnings.py
import warnings # precompiled from /usr/lib/python2.4/warnings.pyc
# /usr/lib/python2.4/linecache.pyc matches /usr/lib/python2.4/linecache.py
import linecache # precompiled from /usr/lib/python2.4/linecache.pyc
import encodings # directory /usr/lib/python2.4/encodings
# /usr/lib/python2.4/encodings/__init__.pyc matches /usr/lib/python2.4/encodings/__init__.py
import encodings # precompiled from /usr/lib/python2.4/encodings/__init__.pyc
# /usr/lib/python2.4/codecs.pyc matches /usr/lib/python2.4/codecs.py
import codecs # precompiled from /usr/lib/python2.4/codecs.pyc
import _codecs # builtin
# /usr/lib/python2.4/encodings/aliases.pyc matches /usr/lib/python2.4/encodings/aliases.py
import encodings.aliases # precompiled from /usr/lib/python2.4/encodings/aliases.pyc
# /usr/lib/python2.4/encodings/latin_1.pyc matches /usr/lib/python2.4/encodings/latin_1.py
import encodings.latin_1 # precompiled from /usr/lib/python2.4/encodings/latin_1.pyc
Python 2.4.3 (#1, May 29 2006, 22:23:40)
[GCC 4.1.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
dlopen("/usr/lib/python2.4/lib-dynload/readline.so", 2);
import readline # dynamically loaded from /usr/lib/python2.4/lib-dynload/readline.so
>>> import gtk.gdk
Traceback (most recent call last):
File "<stdin>", line 1, in ?
ImportError: No module named gtk.gdk
Comment by Jan de Groot (JGC) - Saturday, 19 August 2006, 10:33 GMT
When you have the latest version of pygtk installed, does your system have a /usr/lib/python2.4/site-packages/pygtk.pth? if not, reinstall pygobject.
Comment by Eyolf Østrem (eyolf) - Saturday, 19 August 2006, 10:42 GMT
That solved it.
Comment by Jan de Groot (JGC) - Saturday, 19 August 2006, 11:37 GMT
The infamous pacman file move bug that happens once in a while at random moments. Other option is that you force-downgraded pygtk again, overwriting the files in pygobject.

Loading...