Bug 984284

Summary: [abrt] system-config-printer-1.4.1-7.fc19: newprinter.py:2522:entry_changed:UnicodeDecodeError: 'ascii' codec can't decode byte 0xaa in position 52: ordinal not in range(128)
Product: [Fedora] Fedora Reporter: rainman3d2002
Component: system-config-printerAssignee: Tim Waugh <twaugh>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: jpopelka, rainman3d2002, twaugh
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:be9fa0f6d45c21ad6d218b01fae4e24343507471
Fixed In Version: system-config-printer-1.4.2-1.fc19 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-08-25 22:56:08 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
File: core_backtrace
none
File: environ none

Description rainman3d2002 2013-07-14 13:24:59 UTC
Description of problem:
Trying to add a printer, Samsung ML3051ND. Afterward, it wouldn't search for drivers, until I told it to try again.

Version-Release number of selected component:
system-config-printer-1.4.1-7.fc19

Additional info:
reporter:       libreport-2.1.5
cmdline:        /usr/bin/python /usr/share/system-config-printer/system-config-printer.py
dso_list:       system-config-printer-libs-1.4.1-7.fc19.noarch
executable:     /usr/share/system-config-printer/system-config-printer.py
kernel:         3.9.9-301.fc19.x86_64
runlevel:       N 5
uid:            1000

Truncated backtrace:
newprinter.py:2522:entry_changed:UnicodeDecodeError: 'ascii' codec can't decode byte 0xaa in position 52: ordinal not in range(128)

Traceback (most recent call last):
  File "/usr/share/system-config-printer/newprinter.py", line 2539, in on_entNPTJetDirectHostname_changed
    self.entry_changed(ent, allowed_chars)
  File "/usr/share/system-config-printer/newprinter.py", line 2522, in entry_changed
    allowed_chars = unicode (allowed_chars)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xaa in position 52: ordinal not in range(128)

Local variables in innermost frame:
entry: <Entry object at 0x31bd8c0 (GtkEntry at 0x3237700)>
self: <NewPrinterGUI object at 0x2fd1eb0 (newprinter+NewPrinterGUI at 0x31b3980)>
allowed_chars: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\xaa\xb5\xba\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff0123456789_-.'

Comment 1 rainman3d2002 2013-07-14 13:25:04 UTC
Created attachment 773306 [details]
File: backtrace

Comment 2 rainman3d2002 2013-07-14 13:25:11 UTC
Created attachment 773307 [details]
File: core_backtrace

Comment 3 rainman3d2002 2013-07-14 13:25:20 UTC
Created attachment 773308 [details]
File: environ

Comment 4 Jiri Popelka 2013-07-15 12:36:11 UTC
Thanks, can you show me output of the following command:
$ locale
$ python -c "import string; print string.letters"

Comment 5 Tim Waugh 2013-07-16 11:49:53 UTC
I think we want to be using string.ascii_letters there.

Comment 6 Jiri Popelka 2013-07-16 12:13:38 UTC
It'd probably be better, yes.

However
python -c 'import string; print unicode(string.letters, "utf-8")'
should work with all locales.
I can't find any locale setting where string.letters return non-ascii chars, that's why I asked reporter.

Comment 7 Jiri Popelka 2013-07-16 12:35:35 UTC
(In reply to Tim Waugh from comment #5)
> I think we want to be using string.ascii_letters there.

Fixed upstream
https://git.fedorahosted.org/cgit/system-config-printer.git/commit/?id=50302658bb448bb5a5c2011a9b9fe4c35680e264

Comment 8 Fedora Update System 2013-08-21 16:22:32 UTC
system-config-printer-1.4.2-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/system-config-printer-1.4.2-1.fc19

Comment 9 Fedora Update System 2013-08-23 00:45:04 UTC
Package system-config-printer-1.4.2-1.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing system-config-printer-1.4.2-1.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-15201/system-config-printer-1.4.2-1.fc19
then log in and leave karma (feedback).

Comment 10 Fedora Update System 2013-08-25 22:56:08 UTC
system-config-printer-1.4.2-1.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.