← Back to team overview

divmod-dev team mailing list archive

[Bug 1005603] Re: TypeError: compile() expected string without null bytes

 

** Attachment added: "test.py.gz"
   https://bugs.launchpad.net/bugs/1005603/+attachment/3167037/+files/test.py.gz

-- 
You received this bug notification because you are a member of Divmod-
dev, which is the registrant for Pyflakes.
https://bugs.launchpad.net/bugs/1005603

Title:
  TypeError: compile() expected string without null bytes

Status in Pyflakes:
  New

Bug description:
  Hello,
  I'm reporting http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=674796:

  >>>

  If the tested file contains null bytes, pyflakes fails with traceback:

  $ pyflakes test.py
  Traceback (most recent call last):
    File "/usr/bin/pyflakes", line 5, in <module>
      sys.exit(main(sys.argv[1:]))
    File "/usr/lib/pymodules/python2.7/pyflakes/scripts/pyflakes.py", line 92, in main
      warnings += checkPath(arg)
    File "/usr/lib/pymodules/python2.7/pyflakes/scripts/pyflakes.py", line 74, in checkPath
      return check(fd.read(), filename)
    File "/usr/lib/pymodules/python2.7/pyflakes/scripts/pyflakes.py", line 28, in check
      tree = compile(codeString, filename, "exec", _ast.PyCF_ONLY_AST)
  TypeError: compile() expected string without null bytes
  <<<

  Attached the test file.

  Regards,
  Sandro

To manage notifications about this bug go to:
https://bugs.launchpad.net/pyflakes/+bug/1005603/+subscriptions


References