TypeError: compile() expected string without null bytes
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Pyflakes |
Fix Released
|
Low
|
Florent |
Bug Description
Hello,
I'm reporting http://
>>>
If the tested file contains null bytes, pyflakes fails with traceback:
$ pyflakes test.py
Traceback (most recent call last):
File "/usr/bin/
sys.
File "/usr/lib/
warnings += checkPath(arg)
File "/usr/lib/
return check(fd.read(), filename)
File "/usr/lib/
tree = compile(codeString, filename, "exec", _ast.PyCF_ONLY_AST)
TypeError: compile() expected string without null bytes
<<<
Attached the test file.
Regards,
Sandro
Related branches
- Pyflakes Dev: Pending requested
-
Diff: 98 lines (+46/-3)2 files modifiedpyflakes/api.py (+10/-1)
pyflakes/test/test_api.py (+36/-2)
Changed in pyflakes: | |
status: | New → Confirmed |
assignee: | nobody → Florent (florent.x) |
Changed in pyflakes: | |
status: | Confirmed → In Progress |
Changed in pyflakes: | |
status: | In Progress → Fix Committed |
Changed in pyflakes: | |
milestone: | none → 0.6.1 |
status: | Fix Committed → Fix Released |