Menu

Internal Error

2022-05-30
2023-09-20
  • Michael Miner

    Michael Miner - 2022-05-30

    Hello,

    I am seeing the following error. Can anyone explain this?

    Bailing out from checking src/comms/can.c since there was an internal error: Failed to execute 'python3 /usr/local/share/Cppcheck/addons/runaddon.py /usr/local/share/Cppcheck/addons/misra.py --cli --rule-texts=MISRAC2012e3r1-yqmeto-1-utv3v9_Rules.txt src/comms/can.c.dump'. {"file": "src/comms/can.c", "linenr": 358, "column": 1, "severity": "style", "message": "The character sequences /* and // shall not be used within a comment", "addon": "misra", "errorId": "c2012-3.1", "extra": "Required"}. {"file": "src/comms/can.c", "linenr": 45, "column": 42, "severity": "style", "message": "A string literal shall not be assigned to an object unless the object\u2019s type is \u201cpointer to const-qualified char\u201d", "addon": "misra", "errorId": "c2012-7.4", "extra": "Required"}\012{"file": "src/comms/can.c", "linenr": 48, "column": 27, "severity": "style", "message": "A string literal shall not be assigned to an object unless the object\u2019s type is \u201cpointer to const-qualified char\u201d", "addon": "misra", "errorId": "c2012-7.4", "extra": "Required"}\012{"file": "src/comms/can.c", "linenr": 152, "column": 51, "severity": "style", "message": "A string literal shall not be assigned to an object unless the object\u2019s type is \u201cpointer to const-qualified char\u201d", "addon": "misra", "errorId": "c2012-7.4", "extra": "Required"}\012{"file": "src/comms/can.c", "linenr": 266, "column": 51, "severity": "style", "message": "A string literal shall not be assigned to an object unless the object\u2019s type is \u201cpointer to const-qualified char\u201d", "addon": "misra", "errorId": "c2012-7.4", "extra": "Required"}\012Traceback (most recent call last):\012 File "/usr/local/share/Cppcheck/addons/runaddon.py", line 8, in \012 runpy.run_path(addon, run_name='__main__')\012 File "/usr/lib/python3.8/runpy.py", line 265, in run_path\012 return _run_module_code(code, init_globals, run_name,\012 File "/usr/lib/python3.8/runpy.py", line 97, in _run_module_code\012 _run_code(code, mod_globals, init_globals,\012 File "/usr/lib/python3.8/runpy.py", line 87, in _run_code\012 exec(code, run_globals)\012 File "/usr/local/share/Cppcheck/addons/misra.py", line 4681, in \012 main()\012 File "/usr/local/share/Cppcheck/addons/misra.py", line 4623, in main\012 checker.parseDump(item)\012 File "/usr/local/share/Cppcheck/addons/misra.py", line 4278, in parseDump\012 self.executeCheck(704, self.misra_7_4, cfg)\012 File "/usr/local/share/Cppcheck/addons/misra.py", line 4206, in executeCheck\012 check_function(*args)\012 File "/usr/local/share/Cppcheck/addons/misra.py", line 1840, in misra_7_4\012 if usedParameter.isString and parameterDefinition.nameToken:\012AttributeError: 'NoneType' object has no attribute 'nameToken'
    
     
  • Jens Yllman

    Jens Yllman - 2022-05-30

    Do you have python3 installed?? It used to be running python before. But that fails on system that does not default to python3.

     
  • Daniel Marjamäki

    I don't think it is a python version problem.

    Which cppcheck version is it? Can you reproduce with latest cppcheck-2.8?

     
  • Bob van der Putten

    Same issue here.
    I installed python 3.11 and use Cppcheck 2.12.0
    How to proceed?

     

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.