Feneric / doxypypy

A more Pythonic version of doxypy, a Doxygen filter for Python.
GNU General Public License v2.0
149 stars 49 forks source link

SyntaxError exception for UTF-8-BOM files #25

Closed jonathan-lp closed 8 years ago

jonathan-lp commented 8 years ago

Using Python 3.5, and doxypypy 0.8.8.6 if I run the suggested py_filter.bat file against a python file that's in UTF-8-BOM, then doxypypy raises an exception (as below).

Even happens with a completely empty file, so I guess it's balking at the Unicode header. ANSI files work fine.

Traceback (most recent call last):
  File "C:\Python35\lib\runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Python35\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Python35\lib\site-packages\doxypypy\doxypypy.py", line 836, in <modul
e>
    main()
  File "C:\Python35\lib\site-packages\doxypypy\doxypypy.py", line 830, in main
    astWalker.parseLines()
  File "C:\Python35\lib\site-packages\doxypypy\doxypypy.py", line 741, in parseL
ines
    inAst = parse(''.join(self.lines), self.inFilename)
  File "C:\Python35\lib\ast.py", line 35, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "c:\myscript\test.py", line 1
    """
      ^
SyntaxError: invalid character in identifier
Feneric commented 8 years ago

Yep, sounds like it. I'll take a look.

Feneric commented 8 years ago

Fixed.

cfrings commented 6 years ago

Version 0.8.8.6 is the latest available version on PyPÏ, hence problem is still present (and annoying) in production version.