Bug 1028992 - [abrt] hplip-3.13.9-2.fc19: device.py:821:parseDeviceURI:UnicodeEncodeError: 'ascii' codec can't encode character u'\xba' in position 1: ordinal not in range(128)
[abrt] hplip-3.13.9-2.fc19: device.py:821:parseDeviceURI:UnicodeEncodeError: ...
Status: CLOSED WORKSFORME
Product: Fedora
Classification: Fedora
Component: hplip (Show other bugs)
19
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Tim Waugh
Fedora Extras Quality Assurance
https://retrace.fedoraproject.org/faf...
abrt_hash:7502bb21e50791c4221d882a602...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-11 07:41 EST by Marco Silva
Modified: 2013-11-19 04:51 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-11-19 04:51:05 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
File: backtrace (924 bytes, text/plain)
2013-11-11 07:41 EST, Marco Silva
no flags Details
File: environ (1.85 KB, text/plain)
2013-11-11 07:41 EST, Marco Silva
no flags Details

  None (edit)
Description Marco Silva 2013-11-11 07:41:14 EST
Version-Release number of selected component:
hplip-3.13.9-2.fc19

Additional info:
reporter:       libreport-2.1.9
cmdline:        /usr/bin/python /usr/bin/hp-setup --gui
dso_list:       hplip-gui-3.13.9-2.fc19.x86_64
executable:     /usr/bin/hp-setup
kernel:         3.11.6-201.fc19.x86_64
runlevel:       N 5
type:           Python
uid:            1000

Truncated backtrace:
device.py:821:parseDeviceURI:UnicodeEncodeError: 'ascii' codec can't encode character u'\xba' in position 1: ordinal not in range(128)

Traceback (most recent call last):
  File "/usr/share/hplip/ui4/setupdialog.py", line 1239, in NextButton_clicked
    self.addPrinter()
  File "/usr/share/hplip/ui4/setupdialog.py", line 948, in addPrinter
    self.setupFax()
  File "/usr/share/hplip/ui4/setupdialog.py", line 1004, in setupFax
    self.installed_fax_devices = device.getSupportedCUPSDevices(['hpfax'])
  File "/usr/share/hplip/base/device.py", line 658, in getSupportedCUPSDevices
    parseDeviceURI(p.device_uri)
  File "/usr/share/hplip/base/device.py", line 821, in parseDeviceURI
    m = pat_deviceuri.match(device_uri)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xba' in position 1: ordinal not in range(128)

Local variables in innermost frame:
device_uri: 'hp:/net/HP_LaserJet_P4015?zc=NPI15EE9E'
Comment 1 Marco Silva 2013-11-11 07:41:24 EST
Created attachment 822382 [details]
File: backtrace
Comment 2 Marco Silva 2013-11-11 07:41:27 EST
Created attachment 822383 [details]
File: environ
Comment 3 Jiri Popelka 2013-11-11 09:03:42 EST
Hmmm, no idea what went wrong, the following code works ok and I don't actually see any non-ascii characters involved:

pat_deviceuri = re.compile(r"""(.*):/(.*?)/(\S*?)\?(?:serial=(\S*)|device=(\S*)|ip=(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}[^&]*)|zc=(\S+)|hostname=(\S+))(?:&port=(\d))?""", re.IGNORECASE)
device_uri = 'hp:/net/HP_LaserJet_P4015?zc=NPI15EE9E'
m = pat_deviceuri.match(device_uri)
Comment 4 Tim Waugh 2013-11-18 07:44:31 EST
The only reason I can imagine for this trace is that hp-setup was started and still running while the hplip packages were upgraded.

Marco: are you able to get this to happen again, or did it happen only once? What does 'rpm -q --last hplip-gui' say?
Comment 5 Marco Silva 2013-11-18 13:05:59 EST
I tried to reproduce the problem, but wasn't able to.

It seems to have hapenned once, when I was adding a printer.

rpm -q --last hplip-gui says:

hplip-gui-3.13.9-2.fc19.x86_64                Sex 01 Nov 2013 13:36:33 WET

Please let me know if you need anything else
Comment 6 Tim Waugh 2013-11-19 04:51:05 EST
\xba isn't even a valid first UTF-8 byte (it would have to be a continuation byte), so I really don't know what happened here. Without being able to reproduce it, I'm out of ideas.

Please re-open if you see this happen again.

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