Bug 612315

Summary: [abrt] crash in system-config-printer-1.2.3-3.fc13: system-config-printer.py:3137:rename_printer:AttributeError: 'NoneType' object has no attribute 'name'
Product: [Fedora] Fedora Reporter: dweb98
Component: system-config-printerAssignee: Tim Waugh <twaugh>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 13CC: claudiorodrigo, enricop, ian.springer, jones.peter.busi, jpopelka, prinseer, twaugh
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard: abrt_hash:ac48bae9
Fixed In Version: system-config-printer-1.2.5-6.fc13 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-11-22 22:13:49 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:
Attachments:
Description Flags
File: backtrace none

Description dweb98 2010-07-07 20:39:24 UTC
abrt 1.1.1 detected a crash.

architecture: i686
cmdline: python /usr/share/system-config-printer/system-config-printer.py
comment: Was renaming Short Cut in Printer setup window and got the error and it crashed. 
component: system-config-printer
executable: /usr/share/system-config-printer/system-config-printer.py
kernel: 2.6.33.5-124.fc13.i686
package: system-config-printer-1.2.3-3.fc13
reason: system-config-printer.py:3137:rename_printer:AttributeError: 'NoneType' object has no attribute 'name'
release: Fedora release 13 (Goddard)

backtrace
-----
system-config-printer.py:3137:rename_printer:AttributeError: 'NoneType' object has no attribute 'name'

Traceback (most recent call last):
  File "/usr/share/system-config-printer/system-config-printer.py", line 3085, in printer_name_edited
    self.rename_printer (name, newname)
  File "/usr/share/system-config-printer/system-config-printer.py", line 3137, in rename_printer
    self.printer.name = old_name
AttributeError: 'NoneType' object has no attribute 'name'

Local variables in innermost frame:
new_name: 'Brother MFC-295CN Network - Generic-text-only-printer'
self: <__main__.GUI instance at 0x9be9a8c>
rejecting: False
old_name: u'Generic-text-only-printer'

Comment 1 dweb98 2010-07-07 20:39:26 UTC
Created attachment 430172 [details]
File: backtrace

Comment 3 Ian Springer 2010-07-19 19:02:34 UTC
Package: system-config-printer-1.2.3-3.fc13
Architecture: x86_64
OS Release: Fedora release 13 (Goddard)


How to reproduce
-----
I tried to rename my LAN printer using the Printing applet off the GNOME Administration menu. The printer is a Canon MX340. I tried renaming it from "mx340" to "Canon MX340"

Comment 4 Ian Springer 2010-07-19 20:42:17 UTC
I tried renaming it to "Canon-MX340" instead (note: i replaced the space with a dash), and it worked, so I think it's the space in the printer name that causes it to choke.

Comment 5 Jiri Popelka 2010-09-20 10:37:54 UTC

*** This bug has been marked as a duplicate of bug 625502 ***

Comment 6 Jiri Popelka 2010-09-20 16:19:51 UTC
Actually this bug is really about crashing after putting some spaces in new printer queue name when renaming. (bug #625502 is probably anything else)
Reopening.

Comment 7 Jiri Popelka 2010-09-20 16:20:37 UTC
*** Bug 635538 has been marked as a duplicate of this bug. ***

Comment 8 Jiri Popelka 2010-09-20 16:44:30 UTC
http://git.fedorahosted.org/git/?p=system-config-printer.git;a=commitdiff;h=4b31f9b49620d3eb3d2fdbdd8f9e02204fde295c

The printer name may not contain spaces, slashes (/), or the pound sign (#).

We can't let the user know directly during typing (as we do that when adding new printer) because gtk.CellRendererText doesn't know 'changed' signal.

I chose the easiest way and erase the disallowed characters from the new name just before renaming.

We can eventually make some small dialog preventing renaming until the new name is correct (that's how the cups web interface works).

Comment 9 Fedora Update System 2010-10-13 14:46:49 UTC
system-config-printer-1.2.5-1.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/system-config-printer-1.2.5-1.fc14

Comment 10 Fedora Update System 2010-10-13 14:54:32 UTC
system-config-printer-1.2.5-1.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/system-config-printer-1.2.5-1.fc13

Comment 11 Fedora Update System 2010-10-14 06:23:50 UTC
system-config-printer-1.2.5-1.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update system-config-printer'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/system-config-printer-1.2.5-1.fc13

Comment 12 Fedora Update System 2010-11-16 23:22:46 UTC
system-config-printer-1.2.5-6.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 13 Fedora Update System 2010-11-22 22:12:27 UTC
system-config-printer-1.2.5-6.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.