← Back to team overview

divmod-dev team mailing list archive

[Bug 1005602] [NEW] ValueError: invalid \x escape

 

Public bug reported:

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

>>>
If the tested file contains invalid \x escape, 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)
ValueError: invalid \x escape
<<<

with test.py being:

>>>
foo = '\xyz'
<<<

Regards,
Sandro

** Affects: pyflakes
     Importance: Low
         Status: New

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

Title:
  ValueError: invalid \x escape

Status in Pyflakes:
  New

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

  >>>
  If the tested file contains invalid \x escape, 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)
  ValueError: invalid \x escape
  <<<

  with test.py being:

  >>>
  foo = '\xyz'
  <<<

  Regards,
  Sandro

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


Follow ups

References