Bug 1573430 - [abrt] hplip: to_string_utf8(): sixext.py:113:to_string_utf8:UnicodeDecodeError: 'utf-8' codec can't decode bytes in position 365-366: invalid continuation byte
Summary: [abrt] hplip: to_string_utf8(): sixext.py:113:to_string_utf8:UnicodeDecodeErr...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: hplip
Version: 30
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Zdenek Dohnal
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:f7a1349af1e1562e9c9a665306a...
: 1802841 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-05-01 09:13 UTC by François Jaouen
Modified: 2020-02-21 02:53 UTC (History)
5 users (show)

Fixed In Version: hplip-3.19.12-4.fc31
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-02-21 02:53:06 UTC
Type: ---


Attachments (Terms of Use)
File: backtrace (1.17 KB, text/plain)
2018-05-01 09:13 UTC, François Jaouen
no flags Details
File: cgroup (399 bytes, text/plain)
2018-05-01 09:13 UTC, François Jaouen
no flags Details
File: cpuinfo (1.74 KB, text/plain)
2018-05-01 09:13 UTC, François Jaouen
no flags Details
File: environ (5.03 KB, text/plain)
2018-05-01 09:13 UTC, François Jaouen
no flags Details
File: mountinfo (3.69 KB, text/plain)
2018-05-01 09:13 UTC, François Jaouen
no flags Details
File: namespaces (129 bytes, text/plain)
2018-05-01 09:13 UTC, François Jaouen
no flags Details
File: open_fds (293 bytes, text/plain)
2018-05-01 09:13 UTC, François Jaouen
no flags Details
File: hp-probe.log (3.41 KB, application/octet-stream)
2018-05-01 09:13 UTC, François Jaouen
no flags Details
Patch provided in Launchpad bug (395 bytes, patch)
2019-02-10 17:14 UTC, John Thacker
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1480152 0 None None None 2019-02-10 17:11:16 UTC

Description François Jaouen 2018-05-01 09:13:12 UTC
Description of problem:
Try to detect my network printer HP Photosmart C8260 using the command :
 % hp-probe -bnet -ldebug

Output of the command :

HP Linux Imaging and Printing System (ver. 3.18.4)
Printer Discovery Utility ver. 4.1

Copyright (c) 2001-15 HP Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.


--------------------
| DEVICE DISCOVERY |
--------------------

Probing network for printers. Please wait, this will take approx. 10 seconds...

hp-probe[1859]: debug: {}
hp-probe[1859]: debug: 0000:  01 07 01 a7 00 00 65 6e 00 03 00 00 00 00 01 97 28 78 2d 68 70 2d 76 65 72 3d 30 31 29 28 78 2d  ......en........(x-hp-ver=01)(x-
hp-probe[1859]: debug: 0020:  68 70 2d 6d 61 63 3d 30 30 31 65 30 62 39 61 35 63 63 63 29 28 78 2d 68 70 2d 6e 75 6d 5f 70 6f  hp-mac=001e0b9a5ccc)(x-hp-num_po
hp-probe[1859]: debug: 0040:  72 74 3d 30 31 29 28 78 2d 68 70 2d 69 70 3d 31 39 32 2e 31 36 38 2e 32 34 36 2e 30 31 31 29 28  rt=01)(x-hp-ip=192.168.246.011)(
hp-probe[1859]: debug: 0060:  78 2d 68 70 2d 68 6e 3d 48 50 39 41 35 43 43 43 29 28 78 2d 68 70 2d 70 31 3d 4d 46 47 3a 48 50  x-hp-hn=HP9A5CCC)(x-hp-p1=MFG:HP
hp-probe[1859]: debug: 0080:  3b 4d 44 4c 3a 50 68 6f 74 6f 73 6d 61 72 74 20 43 36 32 30 30 20 73 65 72 69 65 73 3b 43 4d 44  ;MDL:Photosmart C6200 series;CMD
hp-probe[1859]: debug: 00a0:  3a 4d 4c 43 2c 50 43 4c 2c 50 4d 4c 2c 44 57 2d 50 43 4c 2c 44 45 53 4b 4a 45 54 2c 44 59 4e 3b  :MLC,PCL,PML,DW-PCL,DESKJET,DYN;
hp-probe[1859]: debug: 00c0:  31 32 38 34 2e 34 44 4c 3a 34 64 2c 34 65 2c 31 3b 43 4c 53 3a 50 52 49 4e 54 45 52 3b 44 45 53  1284.4DL:4d,4e,1;CLS:PRINTER;DES
hp-probe[1859]: debug: 00e0:  3a 43 43 39 38 38 3b 53 4e 3a 4d 59 37 43 49 48 35 31 30 50 30 35 30 36 3b 53 3a 30 33 38 30 38  :CC988;SN:MY7CIH510P0506;S:03808
hp-probe[1859]: debug: 0100:  38 43 34 38 34 30 30 31 30 32 31 30 30 37 38 63 62 30 30 30 30 30 34 31 62 38 30 34 32 37 34 36  8C4840010210078cb0000041b8042746
hp-probe[1859]: debug: 0120:  62 38 30 34 34 38 34 37 62 38 30 34 34 65 34 34 62 38 30 34 36 34 34 38 62 38 30 30 35 35 34 35  b8044847b8044e44b8046448b8005545
hp-probe[1859]: debug: 0140:  62 38 30 34 36 34 3b 5a 3a 30 31 30 32 2c 30 35 30 30 30 30 30 39 30 31 36 61 38 35 30 31 33 32  b80464;Z:0102,05000009016a850132
hp-probe[1859]: debug: 0160:  34 35 30 31 33 32 34 35 30 31 33 32 34 35 30 31 33 32 34 31 30 31 33 32 34 35 21 73 54 f0 a0 29  45013245013245013241013245!sT..)
hp-probe[1859]: debug: 0180:  4d 7d 21 73 55 ac ff ff fa 40 a0 39 c7 3f 29 28 78 2d 68 70 2d 67 75 69 64 3d 30 30 31 65 30 62  M}!sU....@.9.?)(x-hp-guid=001e0b
hp-probe[1859]: debug: 01a0:  39 61 35 63 63 63 29                                                                             9a5ccc)
Traceback (most recent call last):
  File "/usr/bin/hp-probe", line 162, in <module>
    devices = device.probeDevices([b], timeout, ttl, filter_dict, search, method)
  File "/usr/share/hplip/base/device.py", line 487, in probeDevices
    detected_devices = slp.detectNetworkDevices(ttl, timeout)
  File "/usr/share/hplip/base/slp.py", line 115, in detectNetworkDevices
    x= to_string_utf8(x)
  File "/usr/share/hplip/base/sixext.py", line 113, in to_string_utf8
    return s.decode("utf-8")
UnicodeDecodeError: 'utf-8' codec can't decode bytes in position 365-366: invalid continuation byte

Version-Release number of selected component:
hplip-3.18.4-1.fc28

Additional info:
reporter:       libreport-2.9.5
cmdline:        /usr/bin/python3 /usr/bin/hp-probe -bnet -ldebug
crash_function: to_string_utf8
exception_type: UnicodeDecodeError
executable:     /usr/bin/hp-probe
interpreter:    python3-3.6.5-1.fc28.x86_64
kernel:         4.16.5-300.fc28.x86_64
runlevel:       N 5
type:           Python3
uid:            1000

Truncated backtrace:
sixext.py:113:to_string_utf8:UnicodeDecodeError: 'utf-8' codec can't decode bytes in position 365-366: invalid continuation byte

Traceback (most recent call last):
  File "/usr/bin/hp-probe", line 162, in <module>
    devices = device.probeDevices([b], timeout, ttl, filter_dict, search, method)
  File "/usr/share/hplip/base/device.py", line 487, in probeDevices
    detected_devices = slp.detectNetworkDevices(ttl, timeout)
  File "/usr/share/hplip/base/slp.py", line 115, in detectNetworkDevices
    x= to_string_utf8(x)
  File "/usr/share/hplip/base/sixext.py", line 113, in to_string_utf8
    return s.decode("utf-8")
UnicodeDecodeError: 'utf-8' codec can't decode bytes in position 365-366: invalid continuation byte

Local variables in innermost frame:
s: b'(x-hp-ver=01)(x-hp-mac=001e0b9a5ccc)(x-hp-num_port=01)(x-hp-ip=192.168.246.011)(x-hp-hn=HP9A5CCC)(x-hp-p1=MFG:HP;MDL:Photosmart C6200 series;CMD:MLC,PCL,PML,DW-PCL,DESKJET,DYN;1284.4DL:4d,4e,1;CLS:PRINTER;DES:CC988;SN:MY7CIH510P0506;S:038088C4840010210078cb0000041b8042746b8044847b8044e44b8046448b8005545b80464;Z:0102,05000009016a85013245013245013245013241013245!sT\xf0\xa0)M}!sU\xac\xff\xff\xfa@\xa09\xc7?)(x-hp-guid=001e0b9a5ccc)'

Comment 1 François Jaouen 2018-05-01 09:13:20 UTC
Created attachment 1429138 [details]
File: backtrace

Comment 2 François Jaouen 2018-05-01 09:13:22 UTC
Created attachment 1429139 [details]
File: cgroup

Comment 3 François Jaouen 2018-05-01 09:13:23 UTC
Created attachment 1429140 [details]
File: cpuinfo

Comment 4 François Jaouen 2018-05-01 09:13:24 UTC
Created attachment 1429141 [details]
File: environ

Comment 5 François Jaouen 2018-05-01 09:13:26 UTC
Created attachment 1429142 [details]
File: mountinfo

Comment 6 François Jaouen 2018-05-01 09:13:27 UTC
Created attachment 1429143 [details]
File: namespaces

Comment 7 François Jaouen 2018-05-01 09:13:28 UTC
Created attachment 1429144 [details]
File: open_fds

Comment 8 François Jaouen 2018-05-01 09:13:30 UTC
Created attachment 1429145 [details]
File: hp-probe.log

Comment 9 John Thacker 2019-02-10 17:14:10 UTC
Created attachment 1528767 [details]
Patch provided in Launchpad bug

Patch for /usr/share/hplip/base/sixext.py provided in the Launchpad bug for the same issue.

Comment 10 John Thacker 2019-02-10 17:15:41 UTC
This is exposed by the switch to using Python3 by default. It's a known bug in HPlip that other distributions have seen when they switched to Python3 by default. It is still present in Fedora 29 and the new HPlip. There's a patch that makes things work (but is probably not the Right Way) by ignoring the UTF-8 conversion errors. Using the patch, everything works for me (and people on other distros.)

Comment 11 Ben Cotton 2019-05-02 19:56:01 UTC
This message is a reminder that Fedora 28 is nearing its end of life.
On 2019-May-28 Fedora will stop maintaining and issuing updates for
Fedora 28. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora 'version' of '28'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 28 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 12 John Thacker 2019-05-21 12:24:59 UTC
Just tested it again in 30. Still present in 30. Same patch still fixes it.

Comment 13 Zdenek Dohnal 2020-02-17 11:16:49 UTC
*** Bug 1802841 has been marked as a duplicate of this bug. ***

Comment 14 Fedora Update System 2020-02-19 02:30:58 UTC
hplip-3.19.12-4.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-7e50b0b5eb

Comment 15 Fedora Update System 2020-02-21 02:53:06 UTC
hplip-3.19.12-4.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.


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