install.py crashed with TypeError in main()

Bug #331327 reported by Kyle Jones
174
This bug affects 6 people
Affects Status Importance Assigned to Milestone
usb-creator (Ubuntu)
Fix Released
High
Unassigned
Nominated for Jaunty by André Gondim

Bug Description

Binary package hint: usb-creator

Using a daily live-boot cd of Ubuntu AMD64 on 2GB USB flash drive formatted in FAT to boot & install from said drive.

ProblemType: Crash
Architecture: amd64
DistroRelease: Ubuntu 9.04
ExecutablePath: /usr/share/usb-creator/install.py
InterpreterPath: /usr/bin/python2.5
NonfreeKernelModules: nvidia
Package: usb-creator 0.1.12
PackageArchitecture: all
ProcAttrCurrent: unconfined
ProcCmdline: /usr/bin/python /usr/share/usb-creator/install.py -s /tmp/tmpi9gLFd/. -t /media/LinBoot -p 1103998510
ProcEnviron:
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
PythonArgs: ['/usr/share/usb-creator/install.py', '-s', '/tmp/tmpi9gLFd/.', '-t', '/media/LinBoot', '-p', '1103998510']
SourcePackage: usb-creator
Title: install.py crashed with TypeError in main()
Uname: Linux 2.6.28-8-generic x86_64
UserGroups:

Revision history for this message
Kyle Jones (mutiny32) wrote :
Revision history for this message
Martin Pitt (pitti) wrote :

Confirming, I get exactly the same crash. Problem is quite obvious:

   'bs=%sM'

this needs a "% somenumber" appended, or a hardcoded block size (which probably isn't unreasonable).

Changed in usb-creator:
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Martin Pitt (pitti) wrote :

Although the "bs=%sM" is wrong and will certainly confuse dd, it's not the source of this particular crash. It is

  'count=1' % persist

I think this line would make most sense:

  popen(['dd', 'if=/dev/zero', 'bs=%s' % persist, 'of=%s/casper-rw' % target, 'count=1'])

Revision history for this message
Martin Pitt (pitti) wrote :

Confirmed that this lets the installation finish.

Revision history for this message
Martin Pitt (pitti) wrote :

Works wonderfully now, USB stick boots fine.

Changed in usb-creator:
status: Confirmed → Fix Committed
Revision history for this message
Raptor (phillipss) wrote :

usb creator was installing on a 8gb stick when fatal error occured.

Revision history for this message
André Gondim (andregondim) wrote :

I was installing Alpha 6 on a 2gb stick when crash...

Revision history for this message
Sander Jonkers (jonkers) wrote :

Same crash while trying to install Jaunty Alpha 6 i386 to a 8 GB USB stick.

I don't know whether this matters, but: the crash occured 1 second after clicking the network manager.

Revision history for this message
Sander Jonkers (jonkers) wrote :

@Martin Pitt:

Is your patch (right?) included in Jaunty Alpha 6? Below you can see what my Jaunty Alpha 6 has, so it's looks patched, but I still got the crash.

ubuntu@ubuntu:~$ ls -al /usr/share/usb-creator
total 49
drwxr-xr-x 2 root root 64 2009-03-12 01:04 .
drwxr-xr-x 318 root root 4096 2009-03-14 17:20 ..
-rwxr-xr-x 1 root root 6152 2009-02-06 09:42 install.py
-rw-r--r-- 1 root root 4556 2009-03-12 01:04 install.pyc
-rw-r--r-- 1 root root 34127 2009-02-13 10:35 usbcreator.glade

ubuntu@ubuntu:~$ grep 'count=1' /usr/share/usb-creator/install.py
        popen(['dd', 'if=/dev/zero', 'bs=%sM', 'of=%s/casper-rw' % target, 'count=1' % persist])
ubuntu@ubuntu:~$

Revision history for this message
Sander Jonkers (jonkers) wrote :

FWIW:

Using usb-creator from Linux Mint 6 (based on Ubuntu 8.10), I was able to write the Jaunty-Alpha6-iso to a USB stick. I guess that means the bug was introduced between 8.10 and 9.04.

Revision history for this message
Attila Hammer (hammera) wrote :

This problem present my clean installed Jaunty Alpha6 system.
How can I test Martin Pitt fix?

Attila

Revision history for this message
Attila Hammer (hammera) wrote : Re: [Bug 331327] Re: install.py crashed with TypeError in main()

I doed Martin Pitt modification with /usr/share/usb-creator/install.py
with the 134. line.
Attached the patch. Usb-creator nice doed the 64 bit jaunty usb stick
with following command:
usb-creator -i ~/jaunty-desktop-amd64.iso
I use full remaining space with storage.

Anybody see with following link:
https://bugs.launchpad.net/bugs/335935
This bug similar and duplicate of the https://bugs.launchpad.net/bugs/331327
 bugreport?

Attila

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

This bug was fixed in the package usb-creator - 0.1.13

---------------
usb-creator (0.1.13) jaunty; urgency=low

  [ Evan Dandrea ]
  * Fix the .desktop item i18n support (LP: #331061). Thanks Timo
    Jyrinki!
  * "Note that using GTK_WIN_POS_CENTER_ALWAYS is almost always a bad idea."
    Place the window in the center, don't keep it centered. Thanks Eric
    Butler.
  * Set the title property of the labels after creating WrapLabels, not
    before. Thanks Eric Butler.
  * Point Vcs-Bzr in the control file to the proper location.
  * Call dd with the correct arguments (LP: #331327). Thanks Martin Pitt!
  * Move the addition of usb-creator.desktop.in to POTFILES.in to the build
    script.
  * Support SD cards and other removable devices. Thanks Eric Butler!

  [ Martin Pitt ]
  * setup.py: Remove broken installation of .desktop file; p-distutils-extra
    already does that. Fixes FTBFS.
  * setup.py: Use p-distutils-extra's clean rule to properly remove build/.

 -- Martin Pitt <email address hidden> Sun, 15 Mar 2009 22:48:23 +0100

Changed in usb-creator:
status: Fix Committed → Fix Released
Revision history for this message
jerrylamos (jerrylamos) wrote :

As of today's updates to a bunch of packages including the USB creator I was able to install onto a USB. The USB did then boot and run.

However I wasn't able to do an install from the USB because the partition frame didn't have any partitions in it?? I get the same thing trying to install from CD unless I use alternate CD, which works. It's a Compaq Presario 3.3 gHz Celeron.

When I tried to shut down the USB, there was an error; could have been flash error, I don't know.

Partial success, anyway.

Jerry

Andreas Moog (ampelbein)
tags: added: regression-potential
tags: removed: regression-potential
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.