Bug 672603 - AttributeError: 'NoneType' object has no attribute 'rfind'
Summary: AttributeError: 'NoneType' object has no attribute 'rfind'
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: rawhide
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Ales Kozumplik
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: anaconda_trace_hash:3d3d7ce67b9889e30...
: 673209 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-01-25 17:26 UTC by James Laska
Modified: 2014-09-30 23:39 UTC (History)
11 users (show)

Fixed In Version: anaconda-15.19-1
Clone Of:
Environment:
Last Closed: 2011-09-01 08:04:06 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Attached traceback automatically from anaconda. (438.66 KB, text/plain)
2011-01-25 17:26 UTC, James Laska
no flags Details
Screenshot.png (showing pdb debug window) (8.60 KB, image/png)
2011-01-25 20:01 UTC, James Laska
no flags Details
Attached traceback automatically from anaconda. (577.25 KB, text/plain)
2011-01-27 04:16 UTC, Andre Robatino
no flags Details
Attached traceback automatically from anaconda. (583.81 KB, text/plain)
2011-01-27 20:10 UTC, andy york
no flags Details
Attached traceback automatically from anaconda. (412.11 KB, text/plain)
2011-01-30 11:20 UTC, Hongqing Yang
no flags Details
Attached traceback automatically from anaconda. (420.70 KB, text/plain)
2011-01-30 12:02 UTC, Hongqing Yang
no flags Details
Attached traceback automatically from anaconda. (420.70 KB, text/plain)
2011-01-30 12:09 UTC, Hongqing Yang
no flags Details
Attached traceback automatically from anaconda. (1.17 MB, text/plain)
2011-02-02 23:43 UTC, Joachim Frieben
no flags Details

Description James Laska 2011-01-25 17:26:47 UTC
The following was filed automatically by anaconda:
anaconda 15.16 exception report
Traceback (most recent call first):
  File "/usr/lib64/python2.7/posixpath.py", line 112, in basename
    i = p.rfind('/') + 1
  File "/usr/lib64/python2.7/site-packages/pyanaconda/iutil.py", line 794, in get_sysfs_path_by_name
    dev_name = os.path.basename(dev_name)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/storage/formats/__init__.py", line 407, in majorminor
    sysfs_path = get_sysfs_path_by_name(device)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/storage/devices.py", line 1966, in writeKS
    pvs.append("pv.%s" % pv.format.majorminor)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/storage/__init__.py", line 1185, in writeKS
    device.writeKS(f, preexisting=preexisting, noformat=noformat)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/__init__.py", line 379, in writeKS
    self.storage.writeKS(f)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/packages.py", line 67, in writeKSConfiguration
    anaconda.writeKS(fn)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/dispatch.py", line 211, in moveStep
    rc = stepFunc(self.anaconda)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/dispatch.py", line 130, in gotoNext
    self.moveStep()
  File "/usr/lib64/python2.7/site-packages/pyanaconda/gui.py", line 1265, in nextClicked
    self.anaconda.dispatch.gotoNext()
  File "/usr/lib64/python2.7/site-packages/pyanaconda/iw/progress_gui.py", line 79, in renderCallback
    self.intf.icw.nextClicked()
  File "/usr/lib64/python2.7/site-packages/pyanaconda/gui.py", line 1286, in handleRenderCallback
    self.currentWindow.renderCallback()
AttributeError: 'NoneType' object has no attribute 'rfind'

Comment 1 James Laska 2011-01-25 17:26:52 UTC
Created attachment 475218 [details]
Attached traceback automatically from anaconda.

Comment 2 James Laska 2011-01-25 20:01:26 UTC
Created attachment 475260 [details]
Screenshot.png (showing pdb debug window)

Entering debugger...
> /usr/lib64/python2.7/posixpath.py(112)basename()
-> i = p.rfind('/') + 1

(Pdb) up
> /usr/lib64/python2.7/site-packages/pyanaconda/iutil.py(794)get_sysfs_path_by_name()
-> dev_name = os.path.basename(dev_name)

(Pdb) up
> /usr/lib64/python2.7/site-packages/pyanaconda/storage/formats/__init__.py(407)majorminor()
-> sysfs_path = get_sysfs_path_by_name(device)

(Pdb) p device
None
(Pdb) p self.device
'/dev/vda2/

Comment 3 Chris Lumens 2011-01-25 21:45:04 UTC
We also determined dm_node_from_name is returning None here, hence why device=None.  To me, it looks like the best fix is to make dm_node_from_name always either return something valid or raise DMError, since we've already got code to handle the exception case.  A quick glance through anaconda indicates we're not prepared for dm_node_from_name to return None anywhere.

Comment 4 Andre Robatino 2011-01-27 04:16:48 UTC
Created attachment 475523 [details]
Attached traceback automatically from anaconda.

Comment 5 Andre Robatino 2011-01-27 04:22:20 UTC
In case it's not obvious, you can change the Platform to "All Linux", since I hit this attempting to install from

http://alt.fedoraproject.org/pub/alt/stage/15-Alpha.TC1/Fedora/i386/iso/Fedora-15-Alpha-i386-DVD.iso

It had finished installing all packages, said it was installing the bootloader, then hit this.

Comment 6 Ales Kozumplik 2011-01-27 07:50:55 UTC
Fixed by d896feb152b5a5f8b20f1c70d5253df02c98732e.

Comment 7 James Laska 2011-01-27 14:17:03 UTC
Updates.img available to workaround the reported issue http://jlaska.fedorapeople.org/updates/672603.img

Comment 8 Chris Lumens 2011-01-27 18:03:23 UTC
*** Bug 673209 has been marked as a duplicate of this bug. ***

Comment 9 andy york 2011-01-27 20:10:02 UTC
Created attachment 475679 [details]
Attached traceback automatically from anaconda.

Comment 10 Andre Robatino 2011-01-27 20:52:29 UTC
Using the file from comment 7, I successfully completed an install as a VirtualBox guest using the 32-bit ISO in comment 5. The installer still shows the F14 logo, and after rebooting, it doesn't run firstboot, but I was able to go to a VT and create an ordinary user account manually. Lots of breakage still appears to exist after that (for example I couldn't make it use Thunderbird as the preferred mail reader, even though it was installed). But at least this bug seems fixed. I also have the corresponding 64-bit ISO but haven't tested that yet.

Comment 11 Hongqing Yang 2011-01-30 11:20:39 UTC
Created attachment 476007 [details]
Attached traceback automatically from anaconda.

Comment 12 Hongqing Yang 2011-01-30 12:02:01 UTC
Created attachment 476019 [details]
Attached traceback automatically from anaconda.

Comment 13 Hongqing Yang 2011-01-30 12:09:23 UTC
Created attachment 476022 [details]
Attached traceback automatically from anaconda.

Comment 14 Joachim Frieben 2011-02-02 23:43:24 UTC
Created attachment 476683 [details]
Attached traceback automatically from anaconda.

Comment 15 Andrew McNabb 2011-05-24 18:59:54 UTC
This bug is apparently closed, but it appears very similar to the recently reported bug #706542.  Are the two bugs possibly related?

Comment 16 James Laska 2011-05-24 19:11:47 UTC
(In reply to comment #15)
> This bug is apparently closed, but it appears very similar to the recently
> reported bug #706542.  Are the two bugs possibly related?

My take is that the tracebacks are different.  The resulting python failure is certainly the same ... but the fix will be different.

Comment 17 Andrew McNabb 2011-05-24 19:18:24 UTC
I suspected as such (hence the separate report), but I thought I should at least mention it.  Sorry for the noise.

Comment 18 James Laska 2011-05-24 19:40:51 UTC
(In reply to comment #17)
> I suspected as such (hence the separate report), but I thought I should at
> least mention it.  Sorry for the noise.

Apology not needed at all ... no worries :)


Note You need to log in before you can comment on or make changes to this bug.