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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
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?
I ended up just creating an xml and I created an html template that extracts the errors from the xml and displays them.
Thanks
I ended up just creating an xml and I created an html template that extracts the errors from the xml and displays them.
Thanks
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.