← Back to team overview

desktop-packages team mailing list archive

[Bug 1320868] Re: "UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte" when removing nvidia-current package

 

In the file: /usr/lib/python3/dist-packages/Quirks/quirkinfo.py
Look at line no.45 in for item in self._quirk_info.keys():

value = open(os.path.join(self.sys_dir,
                    'class', 'dmi', 'id', item)).read().strip()

add mode='rb' to open() like this:

value = open(os.path.join(self.sys_dir,
                    'class', 'dmi', 'id', item), mode='rb').read().strip()

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to ubuntu-drivers-common in Ubuntu.
https://bugs.launchpad.net/bugs/1320868

Title:
  "UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position
  0: invalid start byte" when removing nvidia-current package

Status in ubuntu-drivers-common package in Ubuntu:
  Confirmed

Bug description:
  $sudo apt-get remove nvidia-current
  Reading package lists... Done
  Building dependency tree       
  Reading state information... Done
  Package 'nvidia-current' is not installed, so not removed
  The following package was automatically installed and is no longer required:
    linux-image-generic
  Use 'apt-get autoremove' to remove it.
  0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
  1 not fully installed or removed.
  After this operation, 0 B of additional disk space will be used.
  Setting up nvidia-331 (331.38-0ubuntu7) ...
  INFO:Enable nvidia-331
  DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/lenovo_thinkpad
  DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/dell_latitude
  DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/put_your_quirks_here
  Traceback (most recent call last):
    File "/usr/bin/quirks-handler", line 65, in <module>
      operation_status = main(options)
    File "/usr/bin/quirks-handler", line 44, in main
      quirks = Quirks.quirkapplier.QuirkChecker(options.package_enable, path=quirks_path)
    File "/usr/lib/python3/dist-packages/Quirks/quirkapplier.py", line 38, in __init__
      self._system_info = self.get_system_info()
    File "/usr/lib/python3/dist-packages/Quirks/quirkapplier.py", line 64, in get_system_info
      return quirk_info.get_dmi_info()
    File "/usr/lib/python3/dist-packages/Quirks/quirkinfo.py", line 46, in get_dmi_info
      'class', 'dmi', 'id', item)).read().strip()
    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 0xff in position 0: invalid start byte
  dpkg: error processing package nvidia-331 (--configure):
   subprocess installed post-installation script returned error exit status 1
  Errors were encountered while processing:
   nvidia-331
  E: Sub-process /usr/bin/dpkg returned an error code (1)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-drivers-common/+bug/1320868/+subscriptions