doxy-coverage
doxy-coverage copied to clipboard
Issue when running doxy-coverage.py
Hi,
We have the error below when we try to run doxy-coverage.
We use Doxygen 1.8.5
and Python 2.7.5
Output:
$ doxy-coverage.py ./doc/xml
Traceback (most recent call last):
File "/app/shared/doxy-coverage/doxy-coverage.py", line 201, in <module>
main()
File "/app/shared/doxy-coverage/doxy-coverage.py", line 190, in main
files = parse (ns.dir)
File "/app/shared/doxy-coverage/doxy-coverage.py", line 114, in parse
tmp = parse_file (file_fp)
File "/app/shared/doxy-coverage/doxy-coverage.py", line 58, in parse_file
tree = ET.parse(fullpath)
File "/usr/lib64/python2.7/xml/etree/ElementTree.py", line 1182, in parse
tree.parse(source, parser)
File "/usr/lib64/python2.7/xml/etree/ElementTree.py", line 656, in parse
parser.feed(data)
File "/usr/lib64/python2.7/xml/etree/ElementTree.py", line 1642, in feed
self._raiseerror(v)
File "/usr/lib64/python2.7/xml/etree/ElementTree.py", line 1506, in _raiseerror
raise err
xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 12, column 47
Hi,
I have the same problem in my project. FYI, Python 2.7.9, doxygen 1.8.8
I don't known why elementtree thinks xml is malformed, but there's an easy workaround. See Pull request #8
I see the same problem here with doxygen 1.8.14 and python 2.7.12.
Commit 46204d598f3c6434e756d90e811bdddd9f4b39b2 indeed helps a lot, so I definitely support pull request #8. With that modification I only see the warning:
failed to parse xml/readDataParser_8f90.xml not well-formed (invalid token): line 1013, column 154
That line is:
<codeline lineno="936"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">!<sp/>rewrite<sp/>max(A,B)---->(A»B)<sp/>and<sp/>some<sp/>other<sp/>binary<sp/>operators</highlight><highlight class="normal"></highlight></codeline>
Column 154 seems to be the A
in (A»B)
. Possibly the character »
is what causes the problem?
Possibly the character » is what causes the problem?
I think that's indeed the case. The original source code line was just a comment line that contained this character. If I remove the character »
, then the problem goes away.