mnemosyne crashed with AttributeError in import_XML()

Bug #221243 reported by Skout23
8
Affects Status Importance Assigned to Milestone
mnemosyne (Ubuntu)
Fix Released
Medium
Scott Kitterman

Bug Description

Binary package hint: mnemosyne

installed with no problems, shows up in the correct menu, however when I went to import a XML file of facts. It crashed.

ProblemType: Crash
Architecture: i386
Date: Wed Apr 23 17:43:32 2008
DistroRelease: Ubuntu 8.04
ExecutablePath: /usr/bin/mnemosyne
InterpreterPath: /usr/bin/python2.5
NonfreeKernelModules: fglrx
Package: mnemosyne 1.0-0ubuntu3
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 import_XML()
Uname: Linux 2.6.24-16-generic i686
UserGroups: adm admin audio cdrom dialout dip floppy lpadmin netdev plugdev powerdev scanner video

Tags: apport-crash

Related branches

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

This behaviour you will typically get if your database is corrupt. Try creating a new database and importing into that.

(BTW, mnemosyne keeps compressed backups in $HOME/.mnemosyne/backups)

Peter (Mnemosyne author)

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

Not a bug in the Ubuntu package per se.

Changed in mnemosyne:
status: New → Invalid
Revision history for this message
Scott Kitterman (kitterman) wrote :

I disagree. A crash is always a bug. It should at least manage to do something more useful than fall over.

Changed in mnemosyne:
importance: Undecided → Medium
status: Invalid → Confirmed
Revision history for this message
Peter Bienstman (peter-bienstman) wrote :

Well, anyhow 1.1 upstream should be much more robust in that regard, so I'm not sure how much time you still want to spend on this particular version.

Peter

Revision history for this message
Scott Kitterman (kitterman) wrote : Re: [Bug 221243] Re: mnemosyne crashed with AttributeError in import_XML()

Is 1.1 coming soon?

...... Original Message .......
On Sat, 02 Aug 2008 06:16:11 -0000 Peter Bienstman
<email address hidden> wrote:
>Well, anyhow 1.1 upstream should be much more robust in that regard, so
>I'm not sure how much time you still want to spend on this particular
>version.
>
>Peter
>
>--
>mnemosyne crashed with AttributeError in import_XML()
>https://bugs.launchpad.net/bugs/221243
>You received this bug notification because you are a member of Ubuntu
>Pythonistas, which is subscribed to mnemosyne in ubuntu.
>

Revision history for this message
Peter Bienstman (peter-bienstman) wrote : Re: [Bug 221243] Re: mnemosyne crashed with AttributeError in import_XML()

It was released last week. It also got rid of the pyxml dependency, so no
Ubuntu-specific patches should be necessary.

Peter

Revision history for this message
Scott Kitterman (kitterman) wrote :

We had one other change from upstream that we inherited from Debian:

--- mnemosyne-1.0.2.orig/mnemosyne/pyqt_ui/mnemosyne
+++ mnemosyne-1.0.2/mnemosyne/pyqt_ui/mnemosyne
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python2.4

Personally, I'd say these are both wrong. Debian shouldn't be forcing to 2.4 when you support 2.5 (2.5 is the default in Debian too) and I don't think you should depend on /usr/bin/env. I think it's a fragile solution. For people installing via setup.py, distutils will insert the correct interpreter version if needed, so it's unnecessary for them and a problem for distro developers. The best thing is just to use /usr/bin/python.

Looking at the code in 1.1, I don't see that it handles this error any differently (I just looked where it crashed, I don't have a deep understanding of your code). Is it caught somewhere else so we can mark this fixed after I upload 1.1?

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

On Saturday 02 August 2008 16:39:58 Scott Kitterman wrote:
> We had one other change from upstream that we inherited from Debian:
>
> --- mnemosyne-1.0.2.orig/mnemosyne/pyqt_ui/mnemosyne
> +++ mnemosyne-1.0.2/mnemosyne/pyqt_ui/mnemosyne
> @@ -1,4 +1,4 @@
> -#!/usr/bin/env python
> +#!/usr/bin/python2.4
>
> Personally, I'd say these are both wrong. Debian shouldn't be forcing
> to 2.4 when you support 2.5 (2.5 is the default in Debian too) and I
> don't think you should depend on /usr/bin/env. I think it's a fragile
> solution. For people installing via setup.py, distutils will insert the
> correct interpreter version if needed, so it's unnecessary for them and
> a problem for distro developers. The best thing is just to use
> /usr/bin/python.

OK, feel free to patch 1.1 as you see fit, I'll add the patch to SVN.

> Looking at the code in 1.1, I don't see that it handles this error any
> differently (I just looked where it crashed, I don't have a deep
> understanding of your code). Is it caught somewhere else so we can mark
> this fixed after I upload 1.1?

The error is not handled differently, but the conditions that give rise to the
error should no longer occur.

Peter

Changed in mnemosyne:
assignee: nobody → kitterman
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mnemosyne - 1.1-0ubuntu1

---------------
mnemosyne (1.1-0ubuntu1) intrepid; urgency=low

  * New upstream release
    - Improved data corruption prevention (LP: #221243)
  * Changes from Debian:
    - In-line changes for python-xml transition incorporated upstream
    - Modify inline shebang change in mnemosyne/pyqt_ui/mnemosyne to point to
      /usr/bin/python instead of /usr/bin/python2.4 (the change to point to
      /usr/bin/python has been incorporated upstream in their svn)

mnemosyne (1.0.2-1) unstable; urgency=low

  * New upstream release (closes: #483591)
  * Removed version info from man page (closes: #489573)
  * Fixed some minor problems and typos in debian/copyright

 -- Scott Kitterman <email address hidden> Sat, 02 Aug 2008 13:16:17 -0400

Changed in mnemosyne:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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