Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: compile() expected string without null bytes #119

Closed
pyflakes-bot opened this issue May 28, 2012 · 1 comment
Closed

TypeError: compile() expected string without null bytes #119

pyflakes-bot opened this issue May 28, 2012 · 1 comment

Comments

@pyflakes-bot
Copy link

Original report by morph-debian on Launchpad:


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
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

@pyflakes-bot
Copy link
Author

Original comment by morph-debian on Launchpad:


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant