Bug#861731: hplip - UnicodeDecodeError in /usr/share/hplip/base/sixext.py, impossible to print certain files
Package: hplip
Version: 3.16.11+repack0-2
Severity: important
Tags: upstream
Dear Maintainer,
* What led up to the situation?
Trying to print a document with non ASCII characters in its title.
This led to a UnicodeDecodeError:
D [03/May/2017:10:59:23 +0200] [Job 1345] Traceback (most recent call
last):
D [03/May/2017:10:59:23 +0200] [Job 1345] File
\"/usr/lib/cups/filter/hpps\", line 203, in <module>
D [03/May/2017:10:59:23 +0200] [Job 1345] os.write(output_fd,
to_bytes_utf8(\'@PJL SET JOBNAME=\"%s\"\\x0a\' % title))
D [03/May/2017:10:59:23 +0200] [Job 1345] File
\"/usr/share/hplip/base/sixext.py\", line 109, in to_bytes_utf8
D [03/May/2017:10:59:23 +0200] [Job 1345] return s.encode(\"utf-8\")
D [03/May/2017:10:59:23 +0200] [Job 1345] UnicodeEncodeError:
\'utf-8\' codec can\'t encode character \'\\udce2\' in position 47:
surrogates not allowed
* What exactly did you do (or not do) that was effective (or
ineffective)?
Manually fix "/usr/share/hplip/base/sixext.py" by applying the patch
proposed in "https://launchpadlibrarian.net/213208457/sixext.patch"
* What was the outcome of this action?
It fixed the problem, printing works fine now.
-- Package-specific info:
-- System Information:
Debian Release: 9.0
APT prefers testing
APT policy: (250, 'testing')
Architecture: amd64
(x86_64)
Kernel: Linux 4.9.0-2-amd64 (SMP w/12 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages hplip depends on:
ii adduser 3.115
ii coreutils 8.26-3
ii cups 2.2.1-8
ii hplip-data 3.16.11+repack0-2
ii libc6 2.24-10
ii libcups2 2.2.1-8
ii libdbus-1-3 1.10.18-1
ii libhpmud0 3.16.11+repack0-2
ii libsane 1.0.25-4
ii libsane-hpaio 3.16.11+repack0-2
ii libsnmp30 5.7.3+dfsg-1.7
ii libusb-1.0-0 2:1.0.21-1
ii lsb-base 9.20161125
ii policykit-1 0.105-17
ii printer-driver-hpcups 3.16.11+repack0-2
ii python3 3.5.3-1
ii python3-dbus 1.2.4-1+b1
ii python3-gi 3.22.0-2
ii python3-pexpect 4.2.1-1
ii python3-pil 4.0.0-4
ii python3-reportlab 3.3.0-2
ii wget 1.18-5
Versions of packages hplip recommends:
ii avahi-daemon 0.6.32-2
ii printer-driver-postscript-hp 3.16.11+repack0-2
pn sane-utils <none>
Versions of packages hplip suggests:
pn hplip-doc <none>
pn hplip-gui <none>
pn python3-notify2 <none>
pn system-config-printer <none>
-- no debconf information
Reply to: