[Bug 1026016] Re: 3.2.3-3 regression: copy_scripts crashes with UnicodeDecodeError

Brian Murray brian at ubuntu.com
Thu Jul 19 19:31:54 UTC 2012


** Changed in: python3.2 (Ubuntu)
   Importance: Undecided => High

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to python3.2 in Ubuntu.
https://bugs.launchpad.net/bugs/1026016

Title:
  3.2.3-3 regression: copy_scripts crashes with UnicodeDecodeError

Status in “python3.2” package in Ubuntu:
  New

Bug description:
  Until yesterday, ubuntu-drivers-common built just fine. With today's
  python3.2 update, it now fails to build with:

  running build_scripts
  creating build/scripts-3.2
  copying and adjusting nvidia-detector -> build/scripts-3.2
  copying and adjusting quirks-handler -> build/scripts-3.2
  copying and adjusting ubuntu-drivers -> build/scripts-3.2
  Traceback (most recent call last):
    File "/usr/lib/python3.2/tokenize.py", line 298, in find_cookie
      line_string = line.decode('utf-8')
  UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 32: invalid start byte

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "setup.py", line 40, in <module>
      """,
    File "/usr/lib/python3.2/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/usr/lib/python3.2/distutils/dist.py", line 917, in run_commands
      self.run_command(cmd)
    File "/usr/lib/python3.2/distutils/dist.py", line 936, in run_command
      cmd_obj.run()
    File "/usr/lib/python3.2/distutils/command/build.py", line 126, in run
      self.run_command(cmd_name)
    File "/usr/lib/python3.2/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/usr/lib/python3.2/distutils/dist.py", line 936, in run_command
      cmd_obj.run()
    File "/usr/lib/python3.2/distutils/command/build_scripts.py", line 50, in run
      self.copy_scripts()
    File "/usr/lib/python3.2/distutils/command/build_scripts.py", line 82, in copy_scripts
      encoding, lines = tokenize.detect_encoding(f.readline)
    File "/usr/lib/python3.2/tokenize.py", line 327, in detect_encoding
      encoding = find_cookie(first)
    File "/usr/lib/python3.2/tokenize.py", line 300, in find_cookie
      raise SyntaxError("invalid or missing encoding declaration")
  SyntaxError: invalid or missing encoding declaration
  make[1]: *** [override_dh_auto_build] Error 1

  
  After adding a print() to /usr/lib/python3.2/distutils/command/build_scripts.py I found out that it fails on copying share/hybrid/hybrid-detect which is a binary ELF file.

  Why does copy_scripts() even bother with detecting the encoding of the
  file? It's supposed to just copy the program as it is.

  ProblemType: Bug
  DistroRelease: Ubuntu 12.10
  Package: python3.2 3.2.3-3
  ProcVersionSignature: Ubuntu 3.5.0-4.4-generic 3.5.0-rc6
  Uname: Linux 3.5.0-4-generic x86_64
  ApportVersion: 2.3-0ubuntu4
  Architecture: amd64
  Date: Wed Jul 18 10:01:32 2012
  EcryptfsInUse: Yes
  InstallationMedia: Ubuntu 12.10 "Quantal Quetzal" - Alpha amd64 (20120627)
  ProcEnviron:
   TERM=xterm
   PATH=(custom, user)
   LANG=de_DE.UTF-8
   SHELL=/bin/bash
  SourcePackage: python3.2
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python3.2/+bug/1026016/+subscriptions




More information about the foundations-bugs mailing list