git-afsantos / haros_plugins

Plugin repository for the HAROS tool.
7 stars 2 forks source link

Error in Radon plugin: no Halstead volume #16

Open git-afsantos opened 4 years ago

git-afsantos commented 4 years ago
ERROR:haros.analysis_manager:Plugin haros_plugin_radon ran into an error.
DEBUG:haros.analysis_manager:Traceback (most recent call last):
  File "/home/<user>/haros/analysis_manager.py", line 475, in _analysis
    plugin.analysis.analyse_file(iface, scope)
  File "/home/<user>/haros/plugin_manager.py", line 70, in analyse_file
    self.module.file_analysis(iface, scope)
  File "/home/<user>/.local/lib/python2.7/site-packages/haros_plugin_radon/plugin.py", line 36, in file_analysis
    h = analyse_halstead_metrics(iface, code)
  File "/home/<user>/.local/lib/python2.7/site-packages/haros_plugin_radon/plugin.py", line 86, in analyse_halstead_metrics
    iface.report_metric("halstead_volume", metrics.volume)
AttributeError: 'Halstead' object has no attribute 'volume'

No idea why it is missing. Perhaps a different version (re)moved it?

git-afsantos commented 4 years ago

This was reported for Version 4.1.0. I have been using 3.0.1.