[Bug 1208129] Re: Compares NoneType() and str(), hence fails to make bootable usb

Jason jasongaiser at gmail.com
Tue Dec 2 06:38:19 UTC 2014


I hit this bug when I tried to make a USB boot stick using an ISO I
created by following
https://help.ubuntu.com/community/LiveCDCustomizationFromScratch

Fortunately usb-creator-gtk is written in python, so I found the code which was catching the exception:
  
  dpkg-query -L usb-creator-common usb-creator-gtk | grep \\.py | xargs grep -H uncaught
 
and commented it out(vim /usr/lib/python3/dist-packages/usbcreator/install.py...).  That allowed me to get a normal backtrace when the failure occurred:

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python3.4/threading.py", line 920, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3/dist-packages/usbcreator/install.py", line 156, in run
    self.install()
  File "/usr/lib/python3/dist-packages/usbcreator/install.py", line 624, in install
    self.install_bootloader()
  File "/usr/lib/python3/dist-packages/usbcreator/install.py", line 251, in install_bootloader
    self.need_syslinux_legacy(),
  File "/usr/lib/python3/dist-packages/usbcreator/install.py", line 225, in need_syslinux_legacy
    return our_os_ver >= '10.10' and target_os_ver <= '10.04'
TypeError: unorderable types: NoneType() <= str()

Which led to the following function at line 225:

    def need_syslinux_legacy(self):
        target_os_ver, our_os_ver = self.os_vers()
        return our_os_ver >= '10.10' and target_os_ver <= '10.04'

So it looks like self.os_vers() is returning None.  After adding a few
debug prints, the problem turned out to be that self.os_vers() was
having trouble parsing my .disk/.info file, which, as suggested by
https://help.ubuntu.com/community/LiveCDCustomizationFromScratch, was
"Ubuntu Remix".

Changing the value in .disk/.info to "Ubuntu Remix 14.04" seems to have
fixed the issue for me.  There are lots of ways to trigger this bug, I
think, so there's no guarantee this will work for you.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to usb-creator in Ubuntu.
https://bugs.launchpad.net/bugs/1208129

Title:
  Compares NoneType() and str(), hence fails to make bootable usb

Status in usb-creator package in Ubuntu:
  Confirmed

Bug description:
  Ubuntu version: 13.04 with all updates

  Steps to reproduce:
  1. Open usb-creator-gtk or usb-creator-kde
  2. Browse required iso and try to make a usb bootable
  3. Then just after it starts copying files, an error dialog box with following message appears.
  "An uncaught exception was raised: unorderable types: NoneType() <= str()"
  In gtk version dialog box title is "Installation failed", in kde it is "Error - startup disk creator".

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/usb-creator/+bug/1208129/+subscriptions



More information about the foundations-bugs mailing list