pamusb-agent crashes with python import error.

Bug #133100 reported by Craig Main
18
Affects Status Importance Assigned to Milestone
libpam-usb (Ubuntu)
Fix Released
Medium
Unassigned
Nominated for Hardy by Tobias Strauß

Bug Description

When starting pamusb-agent it crashes with this error:

f3021114@f3021114-laptop:~$ pamusb-agent
Traceback (most recent call last):
  File "/usr/bin/pamusb-agent", line 30, in <module>
    import elementtree.ElementTree as et

The solution is to edit /usr/bin/pamusb-agent and change line 30 from:

import elementtree.ElementTree as et

to

import xml.etree.ElementTree as et

All works fine after that.

The problem seems to lie with the fact that ElementTree is now included with python 2.5 and is imported somewhat differently. I guess on the other hand you could run it using the python 2.4 interpreter which would work without a problem....

Tags: patch

Related branches

Revision history for this message
Basilio Kublik (sourcercito) wrote :

i can confirm this bug, and solution, i'll attach a patch with this changes for the package, sorry about the credits craigman, but your profile doesn't shows your name :-(.

Revision history for this message
Chuck Short (zulcss) wrote :

Thanks for the bug report and patch.

Changed in libpam-usb:
status: Confirmed → Fix Committed
Revision history for this message
Nicolas DERIVE (kalon33) wrote :

Please apply patch to current pam-usb and upload it in Gutsy.

Revision history for this message
Daniel Holbach (dholbach) wrote :

Chuck: will you take care of reviewing and sponsoring it?

Changed in libpam-usb:
assignee: nobody → zulcss
Revision history for this message
Chuck Short (zulcss) wrote :

Already taken care of.

Changed in libpam-usb:
status: Fix Committed → Fix Released
Revision history for this message
Nicolas DERIVE (kalon33) wrote :

Is the new version available in Gutsy repository now ? Because if yes, I always have the same problem in a last updated Gutsy....

Revision history for this message
zdenek smetana (zyghom) wrote :

not yet solved although first solution is working
somebody should update gutsy packages ;-(

Revision history for this message
Johnathon (kirrus) wrote :

This is still a problem, because the update changed line 30 to: "xml.elementtree.ElementTree as et" instead of to "xml.etree.ElementTree as et".

This still needs changing and is not fixed.

Revision history for this message
joe richter (joe-r) wrote :

Same bug in Hardy

Traceback (most recent call last):
  File "/usr/bin/pamusb-agent", line 30, in <module>
    import xml.elementtree.ElementTree as et
ImportError: No module named elementtree.ElementTree

the described fix works here too

Johnathon (kirrus)
Changed in libpam-usb:
assignee: zulcss → nobody
status: Fix Released → Confirmed
Revision history for this message
Luca Falavigna (dktrkranz) wrote :

Note that Debian ships 0.4.1-1, so this could be addressed together with a merge from Debian.

Changed in libpam-usb:
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libpam-usb - 0.4.1-1ubuntu1

---------------
libpam-usb (0.4.1-1ubuntu1) intrepid; urgency=low

  * Merge from debian unstable, remaining changes:
    - Update maintainer according to spec.
    - Added pmount. (LP: #144786)
    - Fix for python module import. (LP: #133100)

libpam-usb (0.4.1-1) unstable; urgency=low

  * New upstream version 0.4.1:
      - Fixed a security issue related to OpenSSH authentication
      - Fixed the quiet option (now it is really quiet)
      - Support for devices without vendor/model information
  * Upgraded to Standards-Version: 3.7.2.2
  * Adding dbus, hal and libpam-usb as dependencies for pamusb-tools.

libpam-usb (0.4.0-2) unstable; urgency=low

  * Adding python-dbus as a dependency for pamusb-tools
   (Closes: #423540)

 -- Chuck Short <email address hidden> Fri, 20 Jun 2008 14:25:33 -0500

Changed in libpam-usb:
status: Confirmed → 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.