mnemosyne crashed with AttributeError in <module>()

Bug #206958 reported by Ben
46
Affects Status Importance Assigned to Milestone
mnemosyne (Debian)
Fix Released
Unknown
mnemosyne (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: mnemosyne

Just ran "sudo apt-get install mnemosyne". It installed ok. I clicked on Applications->Education->Mnemosyne and instead of starting Menmosyne, it returned a "sorry mnemosyne closed unexpectedly" message.

ben@ben-laptop:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu hardy (development branch)
Release: 8.04
Codename: hardy

ben@ben-laptop:~$ apt-cache policy mnemosyne
mnemosyne:
  Installed: 1.0-0ubuntu2
  Candidate: 1.0-0ubuntu2
  Version table:
 *** 1.0-0ubuntu2 0
        500 http://us.archive.ubuntu.com hardy/universe Packages
        100 /var/lib/dpkg/status

ProblemType: Crash
Architecture: i386
Date: Wed Mar 26 00:52:32 2008
DistroRelease: Ubuntu 8.04
ExecutablePath: /usr/bin/mnemosyne
InterpreterPath: /usr/bin/python2.5
NonfreeKernelModules: nvidia
Package: mnemosyne 1.0-0ubuntu2
PackageArchitecture: all
ProcCmdline: /usr/bin/python /usr/bin/mnemosyne
ProcEnviron:
 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
 LANG=en_US.UTF-8
 SHELL=/bin/bash
PythonArgs: ['/usr/bin/mnemosyne']
SourcePackage: mnemosyne
Title: mnemosyne crashed with AttributeError in <module>()
Uname: Linux 2.6.24-12-generic i686
UserGroups: adm admin audio cdrom dialout dip floppy fuse lpadmin plugdev video

Tags: apport-crash

Related branches

Revision history for this message
Ben (ben-pecheux) wrote :
Revision history for this message
fuhrysteve (fuhrysteve) wrote :

Are there any workarounds?

Revision history for this message
fuhrysteve (fuhrysteve) wrote :

Here's the command line output of the error (running Hardy):

steve@dickens:~$ mnemosyne
Traceback (most recent call last):
  File "/usr/bin/mnemosyne", line 11, in <module>
    from mnemosyne.pyqt_ui.main_dlg import *
  File "/usr/lib/python2.5/site-packages/mnemosyne/pyqt_ui/main_dlg.py", line 9, in <module>
    from main_frm import *
  File "/usr/lib/python2.5/site-packages/mnemosyne/pyqt_ui/main_frm.py", line 1, in <module>
    from qtextedit2 import *
  File "/usr/lib/python2.5/site-packages/mnemosyne/pyqt_ui/qtextedit2.py", line 11, in <module>
    from mnemosyne.core import *
  File "/usr/lib/python2.5/site-packages/mnemosyne/core/__init__.py", line 1, in <module>
    from mnemosyne_core import *
  File "/usr/lib/python2.5/site-packages/mnemosyne/core/mnemosyne_core.py", line 1425, in <module>
    class XML_Importer(saxutils.DefaultHandler):
AttributeError: 'module' object has no attribute 'DefaultHandler'

Revision history for this message
fuhrysteve (fuhrysteve) wrote :

I just manually installed the python2.4 package (from the repositories) for the hell of it. I get the same error in the console, but now the "sorry mnemosyne closed unexpectedly" window doesn't show up.

Don't know if that helps any.

Revision history for this message
Allen Riddell (ariddell) wrote :

sudo easy_install pyxml fixes things for me. (although this bug needs to be fixed)

Albert Damen (albrt)
Changed in mnemosyne:
assignee: nobody → albrt
status: New → In Progress
Revision history for this message
Albert Damen (albrt) wrote :

Please sponsor the attached debdiff.
This crash is caused by the drop of the python-xml dependency. Although the required modules are provided by the standard Python xml library, this library does not contain the class DefaultHandler which was provided by python-xml. The attached debdiff solves this problem. It also fixes a messagebox error I found during testing and corrects the section in the menu file.
The package builds in a hardy pbuilder and installs, runs and imports/exports xml in a clean schroot.

Changed in mnemosyne:
assignee: albrt → nobody
status: In Progress → Confirmed
Albert Damen (albrt)
Changed in mnemosyne:
status: Confirmed → New
Revision history for this message
Cesare Tirabassi (norsetto) wrote :

I'd like scottk input on this, but I would anyhow avoid any unnecessary change for the time being (menu and messagebox error, the menu problem should be reported to Debian, and the messagebox one should be reported upstream).

Revision history for this message
Scott Kitterman (kitterman) wrote : Re: [Bug 206958] Re: mnemosyne crashed with AttributeError in <module>()

If it's crashing we should fix it. Don't wait on me as I'm still mostly
offline.

Revision history for this message
StefanPotyra (sistpoty) wrote :

sure, debdiff looks sane, please go ahead.

Changed in mnemosyne:
status: New → Confirmed
Revision history for this message
Emilio Pozuelo Monfort (pochu) wrote :

I've verified it's broken in its current state (it won't even start) and that the debdiff fixes it. Uploaded.

Changed in mnemosyne:
importance: Undecided → Medium
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mnemosyne - 1.0-0ubuntu3

---------------
mnemosyne (1.0-0ubuntu3) hardy; urgency=low

  * Add patch 03_python-xml-removal-fix to use ContentHandler instead
    of DefaultHandler as base class for the XML_Importer classes.
    The DefaultHandler class is not provided by the standard Python
    xml library. Fixes crash at start-up (LP: #206958).
  * Add patch 04_messagebox_errors-fix to fix a missing argument in a
    messagebox_errors call.
  * debian/menu: use Applications section instead of Apps.

 -- Albert Damen <email address hidden> Wed, 09 Apr 2008 12:07:32 +0200

Changed in mnemosyne:
status: Fix Committed → Fix Released
Revision history for this message
Albert Damen (albrt) wrote :

Bug and patch forwarded to Debian.

Changed in mnemosyne:
status: Unknown → Fix Released
Revision history for this message
hinlader (hinlader) wrote :

I have the 1.0-0ubuntu3 version installed but I am getting the error. Here is the terminal output I got:

Traceback (most recent call last):
  File "/usr/bin/mnemosyne", line 11, in <module>
    from mnemosyne.pyqt_ui.main_dlg import *
  File "/usr/lib/python2.5/site-packages/mnemosyne/pyqt_ui/main_dlg.py", line 9, in <module>
    from main_frm import *
  File "/usr/lib/python2.5/site-packages/mnemosyne/pyqt_ui/main_frm.py", line 1, in <module>
    from qtextedit2 import *
  File "/usr/lib/python2.5/site-packages/mnemosyne/pyqt_ui/qtextedit2.py", line 11, in <module>
    from mnemosyne.core import *
  File "/usr/lib/python2.5/site-packages/mnemosyne/core/__init__.py", line 1, in <module>
    from mnemosyne_core import *
  File "/usr/lib/python2.5/site-packages/mnemosyne/core/mnemosyne_core.py", line 1425, in <module>
    class XML_Importer(saxutils.DefaultHandler):
AttributeError: 'module' object has no attribute 'DefaultHandler'

I am running on a new Hardy upgrade, and did not have the problem on Gutsy (where Mnemosyne was installed from its website).

Revision history for this message
Albert Damen (albrt) wrote :

>> where Mnemosyne was installed from its website.

That is exactly the problem. The installation from the mnemosyne website puts the files in a different directory then the Ubuntu package and these files cannot be replaced by the Ubuntu mnemosyne package. You will need to remove the mnemosyne files under /usr/lib/python2.5/site-packages/ yourself. See also bug 221438.

Revision history for this message
hinlader (hinlader) wrote :

Thanks for the help. It works fine now.

Revision history for this message
Peter Bienstman (peter-bienstman) wrote :

Hi,

I'm the Mnemosyne developper and I just merged this patch into the Mnemosyne codebase, so it will be in the upcoming Mnemosyne 1.1 release.

For some reason, I was never alerted of the existence of this patch, otherwise I would have done it sooner :-)

In the future, you can also set bugs like this to affect the (newly created) Mnemosyne project page here on Launchpad.

Peter

Revision history for this message
Diogo Matsubara (matsubara) wrote :

Hi Peter, you can subscribe to all bug mail for the specific ubuntu mnemosyne package <https://bugs.edge.launchpad.net/ubuntu/+source/mnemosyne/+subscribe>. You can also link the Ubuntu source package with the upstream project <https://edge.launchpad.net/ubuntu/intrepid/+source/mnemosyne/+edit-packaging>.

Since this bug report is not the right medium to discuss this, please contact me by filing a question https://answers.launchpad.net/launchpad or ping me on #launchpad at freenode.

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.