Bug 968142

Summary: [abrt] system-config-printer-1.4.1-3.fc19: PhysicalDevice.py:181:get_info:UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 34: ordinal not in range(128)
Product: [Fedora] Fedora Reporter: Michael Chapman <redhat-bugzilla>
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: jones.peter.busi, jpopelka, redhat-bugzilla, twaugh
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:431cfe630e140325c602228eb667b1fdea342bec
Fixed In Version: system-config-printer-1.4.5-1.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-07-10 00:23:56 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: dso_list
none
File: environ none

Description Michael Chapman 2013-05-29 05:05:57 UTC
Version-Release number of selected component:
system-config-printer-1.4.1-3.fc19

Additional info:
reporter:       libreport-2.1.4
cmdline:        /usr/bin/python /usr/share/system-config-printer/system-config-printer.py
executable:     /usr/share/system-config-printer/system-config-printer.py
kernel:         3.9.4-300.fc19.x86_64
runlevel:       N 5
uid:            1000

Truncated backtrace:
PhysicalDevice.py:181:get_info:UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 34: ordinal not in range(128)

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/dbus/connection.py", line 604, in msg_reply_handler
    reply_handler(*message.get_args_list(**get_args_opts))
  File "/usr/share/system-config-printer/dnssdresolve.py", line 107, in _reply
    self._resolved ()
  File "/usr/share/system-config-printer/dnssdresolve.py", line 93, in _resolved
    self._reply_handler (self._devices)
  File "/usr/share/system-config-printer/newprinter.py", line 1715, in <lambda>
    devices))
  File "/usr/share/system-config-printer/newprinter.py", line 1718, in dnssd_resolve_reply
    self.add_devices (devices, current_uri, no_more=True)
  File "/usr/share/system-config-printer/newprinter.py", line 2070, in add_devices
    info = device.get_info ()
  File "/usr/share/system-config-printer/PhysicalDevice.py", line 181, in get_info
    info.find(self._network_host) == -1) and \
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 34: ordinal not in range(128)

Local variables in innermost frame:
info: 'HP LaserJet 3390 (D22C8F) @ Lauren\xe2\x80\x99s Mac mini'
self: <PhysicalDevice.PhysicalDevice (,,)>

Comment 1 Michael Chapman 2013-05-29 05:06:02 UTC
Created attachment 754154 [details]
File: backtrace

Comment 2 Michael Chapman 2013-05-29 05:06:06 UTC
Created attachment 754155 [details]
File: core_backtrace

Comment 3 Michael Chapman 2013-05-29 05:06:10 UTC
Created attachment 754156 [details]
File: dso_list

Comment 4 Michael Chapman 2013-05-29 05:06:13 UTC
Created attachment 754157 [details]
File: environ

Comment 5 Tim Waugh 2013-05-30 11:12:33 UTC
What does this command say?: su -c 'lpinfo -v'

Comment 6 Michael Chapman 2013-05-31 00:55:51 UTC
network smb
network http
network socket
network ipps
direct hp
network https
network beh
serial serial:/dev/ttyS0?baud=115200
network lpd
network ipp
direct hpfax
network dnssd://HP%20LaserJet%203390%20(D22C8F)._pdl-datastream._tcp.local/
network dnssd://HP%20LaserJet%203390%20(D22C8F)%20%40%20Lauren%E2%80%99s%20Mac%20mini._ipp._tcp.local/cups
network dnssd://HP%20LaserJet%20M1536dnf%20MFP%20%40%20Chiaki._ipp._tcp.local/cups
network dnssd://Sales%20Colour%20Printer._pdl-datastream._tcp.local/
network dnssd://Sales%20Colour%20Printer%20%40%20Lauren%E2%80%99s%20Mac%20mini._ipp._tcp.local/cups

system-config-printer appears to have tripped up on the %E2%80%99 sequence -- UTF-8 for a Unicode right single quotation mark.

The crash occurred while I was in the "New Printer" dialog, browsing the available network printers. It's a bit odd, though... no matter what I do, I can't seem to crash it at all now.

Comment 7 Tim Waugh 2013-05-31 16:35:52 UTC
Thanks.  I couldn't reproduce it either. :-(

I think it should be fixed upstream in commit c3f0f01.

Comment 8 Fedora Update System 2013-06-07 16:29:20 UTC
system-config-printer-1.4.1-6.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/system-config-printer-1.4.1-6.fc19

Comment 9 Fedora Update System 2013-06-08 02:57:05 UTC
Package system-config-printer-1.4.1-6.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.1-6.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-10351/system-config-printer-1.4.1-6.fc19
then log in and leave karma (feedback).

Comment 10 Fedora Update System 2013-06-13 06:36:36 UTC
system-config-printer-1.4.1-6.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 12 Jiri Popelka 2014-06-13 10:07:43 UTC
*** Bug 1108903 has been marked as a duplicate of this bug. ***

Comment 13 Peter H. Jones 2014-06-19 22:02:28 UTC
Another user experienced a similar problem:

Installing/using a Brother HL2270DW printer. I have installed the drivers from Brother.

reporter:       libreport-2.2.2
cmdline:        /usr/bin/python /usr/share/system-config-printer/system-config-printer.py
executable:     /usr/share/system-config-printer/system-config-printer.py
kernel:         3.14.8-200.fc20.x86_64
package:        system-config-printer-1.4.4-1.fc20
reason:         PhysicalDevice.py:199:get_info:UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 55: ordinal not in range(128)
runlevel:       N 5
type:           Python
uid:            3000

Comment 14 Tim Waugh 2014-06-23 15:45:45 UTC
_network_host is only ever assigned a value in two places, and one of them is always UTF-8.

I've pushed a change to make sure the other one is UTF-8 as well:

https://git.fedorahosted.org/cgit/system-config-printer.git/commit/?h=1.4.x&id=022308bc6f331ae6ca527a61804599ab26cc4d7c

Comment 15 Fedora Update System 2014-07-04 16:31:40 UTC
system-config-printer-1.4.5-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/system-config-printer-1.4.5-1.fc20

Comment 16 Fedora Update System 2014-07-05 14:55:33 UTC
Package system-config-printer-1.4.5-1.fc20:
* should fix your issue,
* was pushed to the Fedora 20 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.5-1.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-8100/system-config-printer-1.4.5-1.fc20
then log in and leave karma (feedback).

Comment 17 Fedora Update System 2014-07-10 00:23:56 UTC
system-config-printer-1.4.5-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.