← Back to team overview

desktop-packages team mailing list archive

[Bug 1400232] Re: system-config-printer crash UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 1441: invalid continuation byte (only UTF-8-encoded PPD files can be used)

 

This bug was fixed in the package system-config-printer -
1.5.1+20141010-0ubuntu2.2

---------------
system-config-printer (1.5.1+20141010-0ubuntu2.2) utopic-proposed; urgency=medium

  * debian/patches/70_package-download-fixes.patch: Fixed several bugs to
    make automatic printer driver download working again (LP: #1401835):
     o Use pyrequests instead of pycurl for secure (verified certificate)
       downloads. pycurl stopped working after the OpenPrinting web server
       has moved from Ubuntu 10.04 to 12.04 (LP: #1394244).
     o In the install-printerdriver script improved the check for the
       necessity of adding the driver's Debian repository and added a
       workaround for a bug in aptdaemon interpreting PackageKit's package
       IDs wrongly when installing a package (LP: #1397750).
     o In fillDriverList() use ".hasattr()" to check presence of
       attributes.
     o Python3 transition bugs
  * debian/patches/73_support-non-utf-8-encoded-ppds.patch: Do not
    crash on non-UTF-8-encoded PPD files (LP: #1400232)
  * debian/control: Depend on python-requests instead of on python-pycurl.
 -- Till Kamppeter <till.kamppeter@xxxxxxxxx>   Sat, 13 Dec 2014 11:01:26 +0100

** Changed in: system-config-printer (Ubuntu Utopic)
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to system-config-printer in Ubuntu.
https://bugs.launchpad.net/bugs/1400232

Title:
  system-config-printer crash UnicodeDecodeError: 'utf-8' codec can't
  decode byte 0xe9 in position 1441: invalid continuation byte (only
  UTF-8-encoded PPD files can be used)

Status in system-config-printer package in Ubuntu:
  Fix Released
Status in system-config-printer source package in Trusty:
  In Progress
Status in system-config-printer source package in Utopic:
  Fix Released

Bug description:
  system-config-printer crash with the following traceback :

  sramage@japc09:~$ system-config-printer
  Traceback (most recent call last):
    File "/usr/share/system-config-printer/asyncipp.py", line 191, in send_reply
      handler (self._conn, result)
    File "/usr/share/system-config-printer/asyncpk1.py", line 164, in _ipp_reply_handler
      self._client_reply_handler (self._conn, *args)
    File "/usr/share/system-config-printer/asyncconn.py", line 91, in reply_handler
      self._reply_handler (self, self._reply_data, *args)
    File "/usr/share/system-config-printer/asyncconn.py", line 209, in _subst_reply_handler
      reply_handler (self, *args)
    File "/usr/share/system-config-printer/ppdcache.py", line 79, in <lambda>
      self._got_ppd3 (c, name, r, callback),
    File "/usr/share/system-config-printer/ppdcache.py", line 153, in _got_ppd3
      self.fetch_ppd (name, callback, check_uptodate=False)
    File "/usr/share/system-config-printer/ppdcache.py", line 90, in fetch_ppd
      tmpf.writelines (f.readlines ())
    File "/usr/lib/python3.4/codecs.py", line 313, in decode
      (result, consumed) = self._buffer_decode(data, self.errors, final)
  UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 1441: invalid continuation byte

  [Impact]

  It is impossible to set up or manipulate a printer with a PPD file
  which is not UTF-8-encoded and no plain ASCII. Even worse, if such a
  PPD is installed into the system's PPD repository, the corresponding
  printer(s) will not auto-setup.

  [Test Case]

  Take a PPD file which is not UTF-8-encoded, for example a PPD file for
  Windows with Windows-1252 encoding. Try to set up a que with it or to
  change an existing queue to use it by means of system-config-printer.
  system-config-printer will crash.

  With the proposed package the PPD can be used without problems.

  [Regression Potential]

  The changes are very simple and therefore the regression potential is
  low.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/system-config-printer/+bug/1400232/+subscriptions


References