timer-applet crashed with AttributeError: 'module' object has no attribute 'Element'

Bug #445549 reported by Martin Olsson
80
This bug affects 12 people
Affects Status Importance Assigned to Milestone
Timer Applet
Invalid
Medium
Kenny Meyer
timer-applet (Ubuntu)
Invalid
Undecided
Kenny Meyer

Bug Description

Binary package hint: timer-applet

crashed directly when I logged in

ProblemType: Crash
Architecture: amd64
Date: Wed Oct 7 17:36:01 2009
DistroRelease: Ubuntu 9.10
ExecutablePath: /usr/lib/timer-applet/timer-applet
InterpreterPath: /usr/bin/python2.6
Package: timer-applet 2.1.2-1
PackageArchitecture: all
ProcCmdline: python /usr/lib/timer-applet/timer-applet --oaf-activate-iid=OAFIID:TimerApplet_Factory --oaf-ior-fd=27
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-12.39-generic
PythonArgs: ['/usr/lib/timer-applet/timer-applet', '--oaf-activate-iid=OAFIID:TimerApplet_Factory', '--oaf-ior-fd=27']
SourcePackage: timer-applet
Title: timer-applet crashed with AttributeError: 'module' object has no attribute 'Element'
Traceback: AttributeError: 'module' object has no attribute 'Element'
Uname: Linux 2.6.31-12-generic x86_64
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

Revision history for this message
Martin Olsson (mnemo) wrote :
Revision history for this message
Apport retracing service (apport) wrote : This bug is a duplicate

Thank you for taking the time to report this crash and helping to make Ubuntu better. This particular crash has already been reported and is a duplicate of bug #423208, so is being marked as such. Please look at the other bug report to see if there is any missing information that you can provide, or to see if there is a workaround for the bug. Additionally, any further discussion regarding the bug should occur in the other report. Please continue to report any other bugs you may find.

tags: removed: need-duplicate-check
visibility: private → public
Revision history for this message
Martin Olsson (mnemo) wrote :

This is most likely still a duplicate of 423208 but it's really annoying when the retracer marks a bug as a duplicate of a non-public bug. Now I don't even get the stack attached to this bug so I can't even take a quick look to see if it's something which is easy to fix.

Revision history for this message
Martin Olsson (mnemo) wrote :

The only reference to ".Element" that I can find is inside src/timerapplet/core/PresetsStore.py:

    def _save_presets(model, file_path):
        root = et.Element('timerapplet')
        root.set('version', '1.1')
        ...

--------------------------
...and in this context "et" is defined as:

try:
    from xml.etree import ElementTree as et
except:
    from elementtree import ElementTree as et

Revision history for this message
Martin Olsson (mnemo) wrote :

Not surprising, the relevant documentation for these modules points out both have valid Element() factory functions:
http://docs.python.org/library/xml.etree.elementtree.html
http://effbot.org/zone/pythondoc-elementtree-ElementTree.htm

So I guess it's some sort of packaging bug.

Revision history for this message
Martin Olsson (mnemo) wrote :

This little sample works on my machine and it prints "1" followed by "2" (python --version returns "Python 2.6.3"):

try:
        print "1"
        from xml.etree import ElementTree as et
        print "2"
except:
        print "3"
        from elementtree import ElementTree as et
        print "4"
x = et.Element('timerapplet')

Revision history for this message
Philipp Kern (pkern) wrote : Re: [Bug 445549] Re: timer-applet crashed with AttributeError: 'module' object has no attribute 'Element'

On Wed, Oct 07, 2009 at 05:06:41PM -0000, Martin Olsson wrote:
> This is most likely still a duplicate of 423208 but it's really annoying
> when the retracer marks a bug as a duplicate of a non-public bug. Now I
> don't even get the stack attached to this bug so I can't even take a
> quick look to see if it's something which is easy to fix.

I made the bugs duplicates of 445549 instead and freed up 423208. Not that
the other bugs would be more helpful in finding the stacktrace in question...

Kind regards,
Philipp Kern

Kenny Meyer (knny-myer)
Changed in timer-applet:
status: New → Confirmed
importance: Undecided → Critical
assignee: nobody → Kenny Meyer (knny-myer)
Kenny Meyer (knny-myer)
Changed in timer-applet:
importance: Critical → Medium
Kenny Meyer (knny-myer)
Changed in timer-applet (Ubuntu):
status: New → Confirmed
assignee: nobody → Kenny Meyer (knny-myer)
Revision history for this message
Kenny Meyer (knny-myer) wrote :

xml.etree.ElementTree is shipped with Python 2.5 by default, so why does this break on Python 2.6?

Revision history for this message
Kenny Meyer (knny-myer) wrote :

Cannot reproduce this error on a virtual Ubuntu 9.10 with Python 2.6 *and* Python 2.5.

In both cases xml.tree.ElementTree is shipped by default with the Python (as it should be).

Changed in timer-applet:
status: Confirmed → Invalid
Changed in timer-applet (Ubuntu):
status: Confirmed → Invalid
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.