A GUI to write .img files to USB Keys

Space characters in image path or filename cause imagewriter to fail when trying to write the image

Reported by ropers on 2012-06-15
32
This bug affects 7 people
Affects Status Importance Assigned to Milestone
USB ImageWriter
Undecided
Unassigned

Bug Description

If there are any space characters in the path/filename of the image file the user is trying to write, then imagewriter will fail silently when trying to burn/write the image. It is possible to select the image using the GUI, and the target storage device can be unmounted, but after that, imagewriter will just sit there doing nothing, with only the Close button available, and no further info will show up under +Details.
If the user however has launched imagewriter from the commandline with gksu imagewriter, then the following output will show up in the terminal at the point of failure (i.e. when imagewriter chokes on a space character as per the above):

Traceback (most recent call last):
  File "/usr/lib/imagewriter/imagewriter.py", line 112, in do_write
    self.raw_write(source, target)
  File "/usr/lib/imagewriter/imagewriter.py", line 150, in raw_write
    src_size = float(data.stdout.readline().split()[4])*1.0
IndexError: list index out of range
Image: /home/username/Desktop/Stuff/Hardware/Computers/Raspberry Pi/debian6-19-04-2012/debian6-19-04-2012.img

Note the space character in the above path.

However, this traceback info may not always show up.
When I tested this with /home/username/Desktop/Stuff/Hardware/Computers/RaspberryPi/debian6-19-04-2012/debian6 19-04-2012.img (i.e. with the space character in the file name as opposed to the path), imagewriter once failed completely silently, with not even the traceback output in the terminal. Another time (also with /home/username/Desktop/Stuff/Hardware/Computers/RaspberryPi/debian6-19-04-2012/debian6 19-04-2012.img), the traceback info did show up, so go figure.

Eliminating all the spaces in both path and filename (e.g. by using /home/username/Desktop/Stuff/Hardware/Computers/RaspberryPi/debian6-19-04-2012/debian6-19-04-2012.img) is a valid work-around and will make imagewriter perform as expected.

This was tested with version 0.1.3-0ubuntu4 of imagewriter under Ubuntu 10.04 LTS.

ropers (ropers) on 2012-06-15
description: updated
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers