[Bug 1380041] Re: Erasing NTFS formatted flash raises AttributeError: 'NoneType' object has no attribute 'get_cached_property'

Brian Murray brian at ubuntu.com
Thu Dec 18 23:55:27 UTC 2014


This is already fixed in Vivid and Utopic:

 $ bzr log -r446 -p
------------------------------------------------------------
revno: 446
committer: Dimitri John Ledkov <dimitri.ledkov at canonical.com>
branch nick: usb-creator
timestamp: Tue 2014-07-22 18:37:18 +0100
message:
  Correctly detect partition-table less parent devices.
diff:
=== modified file 'bin/usb-creator-helper'
--- bin/usb-creator-helper      2014-07-20 21:47:41 +0000
+++ bin/usb-creator-helper      2014-07-22 17:37:18 +0000
@@ -46,6 +46,8 @@
     if obj.get_partition_table():
         return obj
     partition = obj.get_partition()
+    if not partition:
+        return obj
     parent = partition.get_cached_property('Table').get_string()    
     return udisks.get_object(parent)
     

=== modified file 'debian/changelog'
--- debian/changelog    2014-07-20 21:47:49 +0000
+++ debian/changelog    2014-07-22 17:37:18 +0000
@@ -1,3 +1,9 @@
+usb-creator (0.2.60) UNRELEASED; urgency=medium
+
+  * Correctly detect partition-table less parent devices.
+
+ -- Dimitri John Ledkov <xnox at ubuntu.com>  Tue, 22 Jul 2014 18:37:00 +0100


** Also affects: usb-creator (Ubuntu Trusty)
   Importance: Undecided
       Status: New

** Changed in: usb-creator (Ubuntu)
       Status: New => Fix Released

** Changed in: usb-creator (Ubuntu Trusty)
       Status: New => Triaged

** Changed in: usb-creator (Ubuntu Trusty)
   Importance: Undecided => Medium

-- 
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/1380041

Title:
  Erasing NTFS formatted flash raises AttributeError: 'NoneType' object
  has no attribute 'get_cached_property'

Status in usb-creator package in Ubuntu:
  Fix Released
Status in usb-creator source package in Trusty:
  Triaged

Bug description:
  When I'm trying to erase USB flash I'm get popup with following stack
  trace:

  org.freedesktop.DBus.Python.AttributeError: Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/dbus/service.py", line 707, in _message_cb
      retval = candidate_method(self, *args, **keywords)
    File "/usr/share/usb-creator/usb-creator-helper", line 218, in Format
      parent_dev = _get_parent_object(udisks, device)
    File "/usr/share/usb-creator/usb-creator-helper", line 49, in _get_parent_object
      parent = partition.get_cached_property('Table').get_string()
  AttributeError: 'NoneType' object has no attribute 'get_cached_property'

  To workaround this problem I've done:
  1. Remove existing partition on flash drive in GParted.
  2. Create new FAT32 partition for whole flash drive in GParted.
  3. Unplug/plug flash drive.
  4. Start usb-creator-gtk --- "Make Startup Disk" now active and works.

  ProblemType: Bug
  DistroRelease: Ubuntu 14.04
  Package: usb-creator-gtk 0.2.56.2
  ProcVersionSignature: Ubuntu 3.13.0-35.62-generic 3.13.11.6
  Uname: Linux 3.13.0-35-generic x86_64
  ApportVersion: 2.14.1-0ubuntu3.5
  Architecture: amd64
  CurrentDesktop: Unity
  Date: Sat Oct 11 12:00:17 2014
  InstallationDate: Installed on 2014-01-01 (282 days ago)
  InstallationMedia: Ubuntu 13.10 "Saucy Salamander" - Release amd64 (20131016.1)
  SourcePackage: usb-creator
  UpgradeStatus: Upgraded to trusty on 2014-04-27 (166 days ago)

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



More information about the foundations-bugs mailing list