Skip to content
This repository was archived by the owner on Jul 22, 2020. It is now read-only.
This repository was archived by the owner on Jul 22, 2020. It is now read-only.

Halstead Metrics not able to compute  #2

Description

@shiva10162

I am trying to include halstead module by using pymetrics -i halstead:HalsteadMetric but it gives me error :

Traceback (most recent call last):

 File "/home/user/.local/bin/pymetrics", line 6, in <module>
    pm.main ()
  File "/home/user/.local/lib/python2.7/site-packages/PyMetrics/PyMetrics.py", line 194, in main
    metrics = cm( lex )
  File "/home/user/.local/lib/python2.7/site-packages/PyMetrics/compute.py", line 198, in __call__
    tokCount = self.handleToken( tokCount, tok )
  File "/home/user/.local/lib/python2.7/site-packages/PyMetrics/compute.py", line 372, in handleToken
    self.processModule()
  File "/home/user/.local/lib/python2.7/site-packages/PyMetrics/compute.py", line 155, in processModule
    subscriber.processModule( moduleName, mod )
  File "/home/user/.local/lib/python2.7/site-packages/PyMetrics/halstead.py", line 120, in processModule
    result = self.computeCategory( 'module', moduleName, mod )
  File "/home/user/.local/lib/python2.7/site-packages/PyMetrics/halstead.py", line 156, in computeCategory
    for tok in lst:
TypeError: 'ComputeMetrics' object is not iterable 

Not sure what's the problem. Can anyone please look into this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions