Menu

failed to generate html report

2020-04-06
2020-05-15
  • Hadar Epstein

    Hadar Epstein - 2020-04-06

    Hi,
    I've just started using cppcheck and I'm trying to generate an html report.

    I have a mac and I installed cpp using homebrew.
    I also installed pygments using sudo easy_install pygments

    i have a direcroty with the file.c from the example and i'm trying to run this comman according to the manual :
    cppcheck-htmlreport --file=err.xml --report-dir=test1 --source-dir=.

    but I get this error :
    Traceback (most recent call last): File "/usr/local/bin/cppcheck-htmlreport", line 14, in <module> from pygments.formatters import HtmlFormatter # pylint: disable=no-name-in-module File "/Library/Python/2.7/site-packages/Pygments-2.6.1-py2.7.egg/pygments/formatters/__init__.py", line 143, in __getattr__ _load_formatters(info[0]) File "/Library/Python/2.7/site-packages/Pygments-2.6.1-py2.7.egg/pygments/formatters/__init__.py", line 39, in _load_formatters mod = __import__(module_name, None, None, ['__all__']) File "/Library/Python/2.7/site-packages/Pygments-2.6.1-py2.7.egg/pygments/formatters/html.py", line 554 file=sys.stderr) ^ SyntaxError: invalid syntax

    any suggestions?

    Thanks,
    Hadar

     
  • versat

    versat - 2020-04-21

    Hmm, sadly I have no idea why that does not work.
    Pygments 2.6.1 definitely should contain the HtmlFormatter.
    Have you found a solution? What Python 2.7 Version are you using exactly?

     
  • Hadar Epstein

    Hadar Epstein - 2020-04-24

    I ended up just creating an xml and I created an html template that extracts the errors from the xml and displays them.

    Thanks

     
  • Hadar Epstein

    Hadar Epstein - 2020-04-24

    I ended up just creating an xml and I created an html template that extracts the errors from the xml and displays them.

    Thanks

     
  • Guangli Kang

    Guangli Kang - 2020-05-15

    For Pygments 2.6, "Running Pygments on Python 2.x is no longer supported.", see https://pygments.org/docs/changelog/. Use the version 2.5.2 can fix this.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.