Bug 592346

Summary: fillModelList:AttributeError: 'NoneType' object has no attribute 'lower'
Product: Red Hat Enterprise Linux 6 Reporter: Tim Waugh <twaugh>
Component: system-config-printerAssignee: Tim Waugh <twaugh>
Status: CLOSED CURRENTRELEASE QA Contact: Yulia Kopkova <ykopkova>
Severity: medium Docs Contact:
Priority: low    
Version: 6.0CC: azelinka, jpopelka, pknirsch, twaugh, ykopkova
Target Milestone: rc   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard: abrt_hash:39b383d5
Fixed In Version: system-config-printer-1.1.16-12.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 590193 Environment:
Last Closed: 2010-11-10 21:43:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 590193    
Bug Blocks:    

Description Tim Waugh 2010-05-14 15:49:14 UTC
This fix also applies to RHEL-6.

How to reproduce:

Take any PPD and change the '*NickName:' line to read:

*NickName: ""

Create a new queue using this PPD.

Now edit this queue again and click Change... next to Make and Model.

A similar bug: remove both the *NickName: and *Model: lines altogether and follow the same procedure, to get this traceback:

Traceback (most recent call last):
  File "/usr/share/system-config-printer/system-config-printer.py", line 3497, in on_btnChangePPD_clicked
    self.newPrinterGUI.init("ppd")
  File "/usr/share/system-config-printer/system-config-printer.py", line 4006, in init
    if attr.value:
AttributeError: 'NoneType' object has no attribute 'value'

(Fix is: "if attr and attr.value:")

+++ This bug was initially created as a clone of Bug #590193 +++

abrt 1.0.8 detected a crash.

architecture: i686
cmdline: python /usr/share/system-config-printer/system-config-printer.py
comment: lexmark x1100, i don't know fedora 13
component: system-config-printer
executable: /usr/share/system-config-printer/system-config-printer.py
kernel: 2.6.33.1-24.fc13.i686.PAE
package: system-config-printer-1.2.0-4.fc13
reason: system-config-printer.py:6176:fillModelList:AttributeError: 'NoneType' object has no attribute 'lower'
release: Fedora release 13 (Goddard)

backtrace
-----
system-config-printer.py:6176:fillModelList:AttributeError: 'NoneType' object has no attribute 'lower'

Traceback (most recent call last):
  File "/usr/share/system-config-printer/system-config-printer.py", line 6169, in on_tvNPMakes_cursor_changed
    self.fillModelList()
  File "/usr/share/system-config-printer/system-config-printer.py", line 6176, in fillModelList
    is_auto_make = self.NPMake.lower () == self.auto_make.lower ()
AttributeError: 'NoneType' object has no attribute 'lower'

Local variables in innermost frame:
models: [u'PCL 4 LF Printer', u'PCL 4 Printer', u'PCL 5 LF Printer', u'PCL 5 Printer', u'PCL 5c LF Printer', u'PCL 5c Printer', u'PCL 5e LF Printer', u'PCL 5e Printer', u'PCL 6/PCL XL LF Printer', u'PCL 6/PCL XL Printer', u'PCL Laser Printer', u'PostScript Printer', u'Raw Queue', u'text-only printer']
model: <gtk.ListStore object at 0x9ed2374 (GtkListStore at 0x9bda8e0)>
selected: False
self: <__main__.NewPrinterGUI instance at 0x9a30c2c>

--- Additional comment from cybernautape on 2010-05-07 21:52:43 EDT ---

Created an attachment (id=412471)
File: backtrace

--- Additional comment from cybernautape on 2010-05-08 08:17:00 EDT ---



How to reproduce
-----
1.i don't print with fedora 13
2.print usb, but it isn't in db of fedora 13
3.help me!!!
4.-gutenprint-cups cups

Comment
-----
lexmark x1100, i don't know fedora 13

--- Additional comment from twaugh on 2010-05-10 07:52:27 EDT ---

Fixed upstream (835dfb).

Comment 1 RHEL Program Management 2010-05-14 15:54:52 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 2 Jiri Popelka 2010-06-07 17:30:35 UTC
Fixed in system-config-printer-1.1.16-12.el6
http://post-office.corp.redhat.com/archives/cvs-commits-list/2010-June/msg00931.html

Comment 5 releng-rhel@redhat.com 2010-11-10 21:43:53 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.