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

Bug #1208129 reported by Sai Manoj Kumar Yadlapati
120
This bug affects 25 people
Affects Status Importance Assigned to Milestone
usb-creator (Ubuntu)
Fix Released
High
Unassigned

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".

Tags: patch saucy
Revision history for this message
Sai Manoj Kumar Yadlapati (ysaimanojkumar) wrote :
summary: - An uncaught exception was raised: unorderable types: NoneType() <= str()
+ Compares NoneType() and str(), hence fails to make bootable usb
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in usb-creator (Ubuntu):
status: New → Confirmed
Revision history for this message
Erik Squires (eriksq) wrote :

I need to update the firmware on my Crucial M500 ssd drive. To do that I must create a bootable USB drive. There's no way I can due to this bug.

Steps:

1. Run Startup Disk creator from menu.
2. Select ISO.
3. Select USB drive if not already selected.

Try to burn.

Boom.

Revision history for this message
Robert Dale (squiz-clifton) wrote :

I'm getting the exact same issue!

I know it's not my flash drive I have used it to create a couple of bootables from other ISO's works fine no problems, but I was using UnetBootin before.
I'm having the issue while trying to make a USB bootable from Parted Magic.
For some reason UnetBootin fails everytime to make the usb bootable. It writes the files, but thats all it does do. Never boots no matter how many ways I try it. So I decided to try the startup disk creator. Does exactly the same as your describing. It starts to copy the files across, you think great its working, then blam!

An uncaught exception was raised: unorderable types: NoneType() <= str()

So, I'm still out in the cold as to weather the parted magic iso is dodgy. BUt one things for sure, startup disk creator certainly can't do anything about it,

Burhan Ali (burhan)
tags: added: saucy
Changed in usb-creator (Ubuntu):
importance: Undecided → High
Revision history for this message
bootchk (bootch) wrote :

I experienced this on 13.04. I then downloaded the source package for usb-creator_0.2.47.2 (in raring updates repository) and ran usbcreator-gtk from inside Eclipse. I could not reproduce the error in 3 attempts with various iso images and physical drives.

So if you are a user reading this, it might not be fixed because it is hard to reproduce.

I think in addition to printing the given error message, the app should also print the python trace. That wouldn't be any uglier to users, and might make it easier to track down the cause.

Revision history for this message
Gene Soo (genesoo77072) wrote : Re: [Bug 1208129] Re: Compares NoneType() and str(), hence fails to make bootable usb

I completely agree. I used to be a mainframe software developer and
understand the concepts.
The app needs to expose as much diagnostic information as required to
isolate and identify the problem without having an uneducated enduser
expected to recreate the problem running under a development environment.
The fact that the problem is hard to reproduce makes it more critical that
consideration be adhered too.
I can't remember now what ISO I was working with or whether I saved it or
not in order to attempt to recreate.

Gene

On Mon, Mar 31, 2014 at 7:58 AM, bootchk <email address hidden> wrote:

> I experienced this on 13.04. I then downloaded the source package for
> usb-creator_0.2.47.2 (in raring updates repository) and ran usbcreator-
> gtk from inside Eclipse. I could not reproduce the error in 3 attempts
> with various iso images and physical drives.
>
> So if you are a user reading this, it might not be fixed because it is
> hard to reproduce.
>
> I think in addition to printing the given error message, the app should
> also print the python trace. That wouldn't be any uglier to users, and
> might make it easier to track down the cause.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> 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
>

Revision history for this message
Shengyao Xue (xueshengyao) wrote :

I experienced this issue on 14.04 today.

Revision history for this message
Ivan Wirawan (niecw) wrote :

I also experience the same with 14.04.

Revision history for this message
Slick (slick666) wrote :

Also expierencing thins on 14.04 x86_64

Revision history for this message
Jon Smithers (spambox-js) wrote :

I experienced this trying to setup "gparted-live-0.19.0-1-i486.iso" on Ubuntu 13.10, 64-bit.

Revision history for this message
Leith Bade (ljbade) wrote :

I also had this problem with clonezilla-live-2.2.3-25-amd64.iso on Ubuntu 14.04 64 bit.

However it successfully created a bootable Ubuntu Server 14.04 installation disk on the same USB drive.

Revision history for this message
Spott (spott-spottraining) wrote :

Same problem here. I can't make bootable clonezilla USB drive.

Revision history for this message
Mich@l (michaltalar) wrote :

The same problem I have. I couldn't make a bootable pmagic_2014_04_28.iso at TOSHIBA pandrive 4 GB. Actually I have to buy a new one, so be carefull about that.
Cheers

Revision history for this message
Steve_Bz (steve-cookson) wrote :

It's still here. I'm trying to create a clonezilla key with usb-creator-kde (from command line) on trusty.

Here's the trace:

--- Logging error ---
Traceback (most recent call last):
  File "/usr/lib/python3.4/logging/handlers.py", line 71, in emit
    if self.shouldRollover(record):
  File "/usr/lib/python3.4/logging/handlers.py", line 187, in shouldRollover
    msg = "%s\n" % self.format(record)
  File "/usr/lib/python3.4/logging/__init__.py", line 814, in format
    return fmt.format(record)
  File "/usr/lib/python3.4/logging/__init__.py", line 559, in format
    record.exc_text = self.formatException(record.exc_info)
  File "/usr/lib/python3.4/logging/__init__.py", line 509, in formatException
    traceback.print_exception(ei[0], ei[1], tb, None, sio)
  File "/usr/lib/python3.4/traceback.py", line 169, in print_exception
    for line in _format_exception_iter(etype, value, tb, limit, chain):
  File "/usr/lib/python3.4/traceback.py", line 146, in _format_exception_iter
    for value, tb in values:
  File "/usr/lib/python3.4/traceback.py", line 125, in _iter_chain
    context = exc.__context__
AttributeError: 'NoneType' object has no attribute '__context__'
Call stack:
  File "/usr/bin/usb-creator-kde", line 110, in <module>
    sys.exit(app.exec_())
  File "/usr/lib/python3/dist-packages/usbcreator/frontends/kde/frontend.py", line 249, in <lambda>
    lambda: self.__timeout_callback(func, *args))
  File "/usr/lib/python3/dist-packages/usbcreator/frontends/kde/frontend.py", line 226, in __timeout_callback
    active = func(*args)
  File "/usr/lib/python3/dist-packages/usbcreator/frontends/kde/frontend.py", line 104, in test_func
    func()
  File "/usr/lib/python3/dist-packages/usbcreator/frontends/kde/frontend.py", line 48, in <lambda>
    queue.put(lambda: func(*args))
  File "/usr/lib/python3/dist-packages/usbcreator/frontends/kde/frontend.py", line 509, in failure
    self.__fail(message)
  File "/usr/lib/python3/dist-packages/usbcreator/frontends/kde/frontend.py", line 233, in __fail
    logging.exception('Installation failed.')
Message: 'Installation failed.'

Revision history for this message
Jose Gómez (adler-dreamcoder) wrote :

Confirmed this issue with Ubuntu 14.10, trying to create a USB disk with Clonezilla. Is there any known workaround for this issue, or downgrade/upgrade that fixes it?

Revision history for this message
Su Norris (sudo-server) wrote :

This bug also affects me, I'm trying to install a GParted ISO on a 4GB GigaWare drive with Kubuntu on 14.04.

Revision history for this message
Jason (jasongaiser) wrote :

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.

Revision history for this message
Yu Ning (yuningdodo) wrote :

Thank you Jason (jasongaiser), with your debugging result I propose a patch for the issue, it will improve the code in two points:

1. use regex to detect the os version, so 'Ubuntu Remix 14.04' is also supported
2. check whether os ver is successfully detected in need_syslinux_legacy()

however I have a concern about it, in need_syslinux_legacy() before checking for version we should first check if it is an Ubuntu image. For example Debian Wheezy has version string 7.7.0, which will cause need_syslinux_legacy() to return True.

Revision history for this message
Yu Ning (yuningdodo) wrote :

BTW, my patch is based on the trusty-updates branch.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "match-os-ver.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
fatai gbede (fatai15)
Changed in usb-creator (Ubuntu):
assignee: nobody → fatai gbede (fatai15)
Revision history for this message
Sasa Stamenkovic (umpirsky) wrote :

I am experiencing this issue when trying to create clonezilla live USB. How can I apply this patch?

Revision history for this message
Yu Ning (yuningdodo) wrote :

Hi Sasa, maybe you could try my testing ppa, it has the patch alongside with some other patches applied:

sudo add-apt-repository ppa:yuningdodo/test
sudo apt-get update
sudo apt-get install usb-creator-gtk

You could find the source code here (converted to debian 3.0 quilt format):
lp:~yuningdodo/ubuntu/trusty/usb-creator/testing

And you could always remove my ppa and revert to original version with below commands:

sudo rm /etc/apt/sources.list.d/yuningdodo-test-trusty.list
sudo apt-get update
sudo apt-get install usb-creator-gtk/trusty-updates usb-creator-common/trusty-updates

Revision history for this message
fatai gbede (fatai15) wrote :

thank you, i have arranged for the installation with my computerist
> Date: Mon, 9 Feb 2015 03:33:43 +0000
> From: <email address hidden>
> To: <email address hidden>
> Subject: [Bug 1208129] Re: Compares NoneType() and str(), hence fails to make bootable usb
>
> Hi Sasa, maybe you could try my testing ppa, it has the patch alongside
> with some other patches applied:
>
> sudo add-apt-repository ppa:yuningdodo/test
> sudo apt-get update
> sudo apt-get install usb-creator-gtk
>
> You could find the source code here (converted to debian 3.0 quilt format):
> lp:~yuningdodo/ubuntu/trusty/usb-creator/testing
>
> And you could always remove my ppa and revert to original version with
> below commands:
>
> sudo rm /etc/apt/sources.list.d/yuningdodo-test-trusty.list
> sudo apt-get update
> sudo apt-get install usb-creator-gtk/trusty-updates usb-creator-common/trusty-updates
>
> --
> You received this bug notification because you are a bug assignee.
> 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

Revision history for this message
Yu Ning (yuningdodo) wrote :

Hi guys, I have proposed a merge request with the patch I provided in comment #18, could anyone help to review it? thanks in advance.

Changed in usb-creator (Ubuntu):
assignee: fatai gbede (fatai15) → nobody
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

---------------
usb-creator (0.2.66) vivid; urgency=medium

  * usbcreator/install.py: adjust grub configurations, otherwise the
    persistent mode can't be enabled with UEFI BIOS. (LP: #1159016)
  * usbcreator/install.py: detect os version with regex and check for the
    result. (LP: #1208129)
  * GTK: select a source if it's already added. (LP: #978691)
  * GTK: scroll to the selected source.
 -- Yu Ning <email address hidden> Fri, 06 Mar 2015 12:39:57 -0500

Changed in usb-creator (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
George (3grciii) wrote :
Download full text (5.3 KiB)

Same issue today after update. Ubuntu 14.04.2 LTS - Error: An uncaught exception was raised:
unorderable types: NoneType() <= str()

kernel 3.13.0-51-generic #84-Ubuntu SMP Wed Apr 15 12:11:46 UTC 2015 i686 i686 i686 GNU/Linux

usb-creator-gtk --version
0.2.23

Trying to use an old pmagic_2013_08_01.iso on 4GB Transcend flash drive

Same result with or without reserved extra space (persistence)

Erase disk works as expected

dpkg.log for today:
2015-04-23 14:40:28 startup archives unpack
2015-04-23 14:40:29 upgrade usb-creator-gtk:i386 0.2.56.3 0.2.56.3ubuntu0.1
2015-04-23 14:40:29 status half-configured usb-creator-gtk:i386 0.2.56.3
2015-04-23 14:40:29 status unpacked usb-creator-gtk:i386 0.2.56.3
2015-04-23 14:40:29 status half-installed usb-creator-gtk:i386 0.2.56.3
2015-04-23 14:40:29 status triggers-pending hicolor-icon-theme:all 0.13-1
2015-04-23 14:40:29 status half-installed usb-creator-gtk:i386 0.2.56.3
2015-04-23 14:40:29 status triggers-pending man-db:i386 2.6.7.1-1ubuntu1
2015-04-23 14:40:29 status triggers-pending bamfdaemon:i386 0.5.1+14.04.20140409-0ubuntu1
2015-04-23 14:40:29 status half-installed usb-creator-gtk:i386 0.2.56.3
2015-04-23 14:40:29 status triggers-pending desktop-file-utils:i386 0.22-1ubuntu1
2015-04-23 14:40:29 status half-installed usb-creator-gtk:i386 0.2.56.3
2015-04-23 14:40:29 status triggers-pending mime-support:all 3.54ubuntu1.1
2015-04-23 14:40:29 status triggers-pending gnome-menus:i386 3.10.1-0ubuntu2
2015-04-23 14:40:29 status half-installed usb-creator-gtk:i386 0.2.56.3
2015-04-23 14:40:29 status unpacked usb-creator-gtk:i386 0.2.56.3ubuntu0.1
2015-04-23 14:40:29 status unpacked usb-creator-gtk:i386 0.2.56.3ubuntu0.1
2015-04-23 14:40:29 upgrade usb-creator-common:i386 0.2.56.3 0.2.56.3ubuntu0.1
2015-04-23 14:40:29 status half-configured usb-creator-common:i386 0.2.56.3
2015-04-23 14:40:30 status unpacked usb-creator-common:i386 0.2.56.3
2015-04-23 14:40:30 status half-installed usb-creator-common:i386 0.2.56.3
2015-04-23 14:40:30 status half-installed usb-creator-common:i386 0.2.56.3
2015-04-23 14:40:30 status unpacked usb-creator-common:i386 0.2.56.3ubuntu0.1
2015-04-23 14:40:30 status unpacked usb-creator-common:i386 0.2.56.3ubuntu0.1
2015-04-23 14:40:30 upgrade wpasupplicant:i386 2.1-0ubuntu1.1 2.1-0ubuntu1.2
2015-04-23 14:40:30 status half-configured wpasupplicant:i386 2.1-0ubuntu1.1
2015-04-23 14:40:30 status unpacked wpasupplicant:i386 2.1-0ubuntu1.1
2015-04-23 14:40:30 status half-installed wpasupplicant:i386 2.1-0ubuntu1.1
2015-04-23 14:40:30 status half-installed wpasupplicant:i386 2.1-0ubuntu1.1
2015-04-23 14:40:30 status unpacked wpasupplicant:i386 2.1-0ubuntu1.2
2015-04-23 14:40:30 status unpacked wpasupplicant:i386 2.1-0ubuntu1.2
2015-04-23 14:40:30 trigproc hicolor-icon-theme:all 0.13-1 0.13-1
2015-04-23 14:40:30 status half-configured hicolor-icon-theme:all 0.13-1
2015-04-23 14:40:31 status installed hicolor-icon-theme:all 0.13-1
2015-04-23 14:40:31 trigproc man-db:i386 2.6.7.1-1ubuntu1 2.6.7.1-1ubuntu1
2015-04-23 14:40:31 status half-configured man-db:i386 2.6.7.1-1ubuntu1
2015-04-23 14:40:32 status installed man-db:i386 2.6.7.1-1ubuntu1
2015-04-23 14:40:32 trigproc bamfdaemon:i386 ...

Read more...

Revision history for this message
Yu Ning (yuningdodo) wrote :

Looks like the SRU to trusty hasn't been performed yet.

Revision history for this message
Rui H F Azevedo (ruihfazevedo) wrote :

same error ubuntu 14.04 trying to make a clonezilla boot pendrive, i'm tired.

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.