Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 651870 - net-print/hplip-3.17.10 hp-setup: File "/usr/share/hplip/base/sixext.py", line 113, in to_string_utf8 // UnicodeDecodeError: 'utf-8' codec can't decode byte 0x9e in position 363: invalid start byte
Summary: net-print/hplip-3.17.10 hp-setup: File "/usr/share/hplip/base/sixext.py", lin...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Daniel Pielmeier
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-28 21:27 UTC by Nick Wiltshire
Modified: 2018-04-21 10:20 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
sixext.patch (sixext.patch,423 bytes, patch)
2018-04-07 17:50 UTC, Daniel Pielmeier
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Wiltshire 2018-03-28 21:27:51 UTC
When using python 3.5:

$ hp-setup

HP Linux Imaging and Printing System (ver. 3.17.10)
Printer/Fax Setup Utility ver. 9.0

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.

Searching... (bus=net, timeout=5, ttl=4, search=(None) desc=0, method=slp)
\Traceback (most recent call last):
  File "/usr/share/hplip/ui5/setupdialog.py", line 1297, in NextButton_clicked
    self.showDevicesPage()
  File "/usr/share/hplip/ui5/setupdialog.py", line 566, in showDevicesPage
    filter_dict, self.search, net_search=net_search_type)
  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 byte 0x9e in position 363: invalid start byte                                                                                                                                                       
Aborted                            


Workaround:
Set USE on package to PYTHON_TARGETS: -* python2_7 PYTHON_SINGLE_TARGET: -* python2_7
Comment 1 Daniel Pielmeier gentoo-dev 2018-04-07 14:10:13 UTC
I can not reproduce. Probably there are some unicode characters slipping in which can't be processed. Can you please try if the patch attached to this bug [1] fixes the issue.

https://bugs.launchpad.net/hplip/+bug/1480152
Comment 2 Nick Wiltshire 2018-04-07 17:11:42 UTC
I can still produce the bug by removing the workaround.

Forgive me if I did this wrong:
mkdir -p /etc/portage/patches/net-print/hplip-3.17.10
cd /etc/portage/patches/net-print/hplip-3.17.10/
wget https://launchpadlibrarian.net/213208457/sixext.patch
emerge -va hplip

...

 * Applying sixext.patch ...
The text leading up to this was:
--------------------------
|--- /src/base/sixext.py        2015-06-16 16:40:00.369392772 +0530
|+++ sixext.py  2015-07-31 15:36:08.011051408 +0530
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored                                                                                                                                                                                                                     [ !! ]
 * ERROR: net-print/hplip-3.17.10::gentoo failed (prepare phase):
 *   patch -p1  failed with /etc/portage/patches/net-print/hplip-3.17.10/sixext.patch
 * 
 * Call stack:

...
Comment 3 Daniel Pielmeier gentoo-dev 2018-04-07 17:50:29 UTC
Created attachment 526812 [details, diff]
sixext.patch

Well the patch failed to apply, so the bug should be still there. I just applied it manually to test.

Use this one here. It should work as user patch.
Comment 4 Nick Wiltshire 2018-04-07 17:56:52 UTC
The attached patch fixed it.
Comment 5 Daniel Pielmeier gentoo-dev 2018-04-07 18:03:21 UTC
Strange according to upstream this bug should be fixed.
Comment 6 Daniel Pielmeier gentoo-dev 2018-04-21 10:20:01 UTC
This is fixed in Git with hplip-3.18.3-r1.

Thanks for the report.