[Python-apps-team] Bug#674796: pyflakes: TypeError: compile() expected string without null bytes
Jakub Wilk
jwilk at debian.org
Sun May 27 18:22:27 UTC 2012
Package: pyflakes
Version: 0.5.0-1
Severity: minor
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
-- System Information:
Debian Release: wheezy/sid
APT prefers unstable
APT policy: (990, 'unstable'), (500, 'experimental')
Architecture: i386 (x86_64)
Kernel: Linux 3.3.0-trunk-amd64 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=pl_PL.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages pyflakes depends on:
ii python 2.7.2-10
ii python-support 1.0.14
--
Jakub Wilk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.py.gz
Type: application/octet-stream
Size: 30 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/python-apps-team/attachments/20120527/8131aba1/attachment.obj>
More information about the Python-apps-team
mailing list