accerciser crashed with AttributeError in __main__: 'module' object has no attribute 'PARAM_APP_DATADIR'

Bug #790613 reported by Jean-Baptiste Lallement
20
This bug affects 2 people
Affects Status Importance Assigned to Milestone
gnome-python (Debian)
Fix Released
Unknown
gnome-python (Ubuntu)
Fix Released
High
Martin Pitt

Bug Description

Binary package hint: accerciser

Crash on Oneiric up to date with at-spi2 installed instead of at-spi

ProblemType: Crash
DistroRelease: Ubuntu 11.10
Package: accerciser 1.12.1-0ubuntu2
ProcVersionSignature: Ubuntu 2.6.39-3.10-generic 2.6.39
Uname: Linux 2.6.39-3-generic i686
Architecture: i386
Date: Tue May 31 13:09:58 2011
EcryptfsInUse: Yes
ExecutablePath: /usr/bin/accerciser
InterpreterPath: /usr/bin/python2.7
PackageArchitecture: all
ProcCmdline: python /usr/bin/accerciser
ProcEnviron:
 SHELL=/bin/bash
 PATH=(custom, user)
 LANG=en_US.utf8
 LANGUAGE=en_US:en
PythonArgs: ['/usr/bin/accerciser']
SourcePackage: accerciser
Title: accerciser crashed with AttributeError in __main__: 'module' object has no attribute 'PARAM_APP_DATADIR'
Traceback:
 Traceback (most recent call last):
   File "/usr/bin/accerciser", line 33, in <module>
     props = { gnome.PARAM_APP_DATADIR : os.path.join(sys.prefix, 'share')}
 AttributeError: 'module' object has no attribute 'PARAM_APP_DATADIR'
UpgradeStatus: Upgraded to oneiric on 2011-05-16 (14 days ago)
UserGroups: adm admin audio cdrom dialout dip floppy fuse libvirtd lpadmin netdev plugdev scanner sudo video

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :
visibility: private → public
affects: accerciser (Debian) → gnome-python (Debian)
tags: removed: need-duplicate-check
Revision history for this message
Pedro Villavicencio (pedro) wrote :

according to upstream (debian):

"The problem here is due to the fact we have changed python helper
(pysupport to dh_python2) and that all the packages that share the same
namespace MUST use the same.

I should have added tighter Breaks/Dependencies but there are quite
some packages involved and that was not that trivial."

affects: accerciser (Ubuntu) → gnome-python (Ubuntu)
Changed in gnome-python (Ubuntu):
importance: Undecided → High
status: New → Triaged
Revision history for this message
Martin Pitt (pitti) wrote :

Do I need to do particular steps to get the crash? On current oneiric I did "sudo apt-get install accerciser", run "accerciser", and get the main window. The main window displays an exception

Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/accerciser/plugin/base_plugin.py", line 156, in __call__
    return self.func(*args, **kwargs)
  File "/usr/share/accerciser/plugins/interface_view.py", line 91, in init
    section = _InterfaceSection(ui_xml, self.node, iface_name)
  File "/usr/share/accerciser/plugins/interface_view.py", line 167, in __init__
    self._setExpanderChildrenSensitive(False)
  File "/usr/share/accerciser/plugins/interface_view.py", line 226, in _setExpanderChildrenSensitive
    label = expander.get_label_widget()
AttributeError: 'NoneType' object has no attribute 'get_label_widget'

but this seems unrelated? (the window doesn't crash)

Changed in gnome-python (Ubuntu):
status: Triaged → Incomplete
Revision history for this message
Martin Pitt (pitti) wrote :

Ah, this is due to some leftover files:

ls -l /usr/lib/pymodules/python2.*/gtk-2.0/*gnome*
lrwxrwxrwx 1 root root 50 2011-05-31 21:43 /usr/lib/pymodules/python2.6/gtk-2.0/gnomeapplet.so -> /usr/lib/pyshared/python2.6/gtk-2.0/gnomeapplet.so
lrwxrwxrwx 1 root root 51 2011-06-01 08:55 /usr/lib/pymodules/python2.6/gtk-2.0/gnomekeyring.so -> /usr/lib/pyshared/python2.6/gtk-2.0/gnomekeyring.so
lrwxrwxrwx 1 root root 50 2011-05-31 21:43 /usr/lib/pymodules/python2.7/gtk-2.0/gnomeapplet.so -> /usr/lib/pyshared/python2.7/gtk-2.0/gnomeapplet.so
lrwxrwxrwx 1 root root 51 2011-06-01 08:55 /usr/lib/pymodules/python2.7/gtk-2.0/gnomekeyring.so -> /usr/lib/pyshared/python2.7/gtk-2.0/gnomekeyring.so

/usr/lib/pymodules/python2.6/gtk-2.0/gnome:
total 8
lrwxrwxrwx 1 root root 43 2011-05-31 21:43 applet.py -> /usr/share/pyshared/gtk-2.0/gnome/applet.py
-rw-r--r-- 1 root root 338 2011-05-31 21:43 applet.pyc
-rw-r--r-- 1 root root 0 2011-05-30 10:06 __init__.py
-rw-r--r-- 1 root root 141 2011-05-30 14:21 __init__.pyc

/usr/lib/pymodules/python2.7/gtk-2.0/gnome:
total 8
lrwxrwxrwx 1 root root 43 2011-05-31 21:43 applet.py -> /usr/share/pyshared/gtk-2.0/gnome/applet.py
-rw-r--r-- 1 root root 338 2011-05-31 21:43 applet.pyc
-rw-r--r-- 1 root root 0 2011-05-30 10:06 __init__.py
-rw-r--r-- 1 root root 141 2011-05-30 10:06 __init__.pyc

while on my (rather clean) system it is

lrwxrwxrwx 1 root root 51 2011-06-01 06:40 /usr/lib/pymodules/python2.6/gtk-2.0/gnomekeyring.so -> /usr/lib/pyshared/python2.6/gtk-2.0/gnomekeyring.so
lrwxrwxrwx 1 root root 51 2011-06-01 06:40 /usr/lib/pymodules/python2.7/gtk-2.0/gnomekeyring.so -> /usr/lib/pyshared/python2.7/gtk-2.0/gnomekeyring.so

Reproducer:
$ sudo mkdir /usr/lib/pymodules/python2.7/gtk-2.0/gnome
$ sudo touch /usr/lib/pymodules/python2.7/gtk-2.0/gnome/__init__.py
$ python -c 'import gnome; print gnome.PARAM_APP_DATADIR'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
AttributeError: 'module' object has no attribute 'PARAM_APP_DATADIR'

Changed in gnome-python (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
status: Incomplete → In Progress
Revision history for this message
Martin Pitt (pitti) wrote :

I committed a fix to the Debian svn, and uploaded a test package to https://launchpad.net/~pitti/+archive/ppa -- would you be able to test this? It should clean up the cruft.

Changed in gnome-python (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

I confirm that the package from the PPA fixes this issue with accerciser.

---
Ubuntu Bug Squad volunteer triager
http://wiki.ubuntu.com/BugSquad

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-python - 2.28.1-3

---------------
gnome-python (2.28.1-3) unstable; urgency=low

  [ Josselin Mouette ]
  * Drop incorrect ${python:Provides}.

  [ Martin Pitt ]
  * debian/control.in: Add Conficts/Replaces: python-gnomecanvas. This only
    existed in Ubuntu (which now is getting rid of this delta), and is a
    no-op for Debian.
  * debian/watch: Fix syntax to actually catch latest version. Also move to
    *.bz2, upstream does not release .gz tarballs any more.
  * debian/python-gnome2.postinst: Remove old __init__.py{,c} cruft from
    pysupport, which causes bad imports after upgrades. (LP: #790613)
 -- Martin Pitt <email address hidden> Wed, 08 Jun 2011 17:03:35 +0200

Changed in gnome-python (Ubuntu):
status: Fix Committed → Fix Released
Changed in gnome-python (Debian):
status: Unknown → Incomplete
Changed in gnome-python (Debian):
status: Incomplete → New
Changed in gnome-python (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.