numericalalgorithmsgroup / pypop

Python Tools for the POP Metrics
https://numericalalgorithmsgroup.github.io/pypop/doc.html
Other
12 stars 5 forks source link

NameError: free variable 'cut_trace' referenced before assignment in enclosing scope #36

Closed Jonathan3145 closed 3 years ago

Jonathan3145 commented 4 years ago

Running pypop-preprocess with --chop-to-roi I get an error from the develop branch of PyPOP, I've swapped to my branch and that seems to work ok.

pypop-preprocess --outfile-path ./pypop_files --tmpdir-path ../junk --chop-to-roi parody_pdaf.prv

Traceback (most recent call last):                                                                                                            
  File "/fserver/jonathanb/.local/bin/pypop-preprocess", line 11, in <module>
    load_entry_point('pypop', 'console_scripts', 'pypop-preprocess')()
  File "/fserver/jonathanb/pop/pypop_stuff/pypop/pypop/cli.py", line 308, in preprocess_traces
    TraceSet(
  File "/fserver/jonathanb/pop/pypop_stuff/pypop/pypop/traceset.py", line 83, in __init__
    self.add_traces(
  File "/fserver/jonathanb/pop/pypop_stuff/pypop/pypop/traceset.py", line 145, in add_traces
    Trace.load(
  File "/fserver/jonathanb/pop/pypop_stuff/pypop/pypop/trace/trace.py", line 66, in load
    return loader(
  File "/fserver/jonathanb/pop/pypop_stuff/pypop/pypop/trace/trace.py", line 133, in __init__
    self._load_trace()
  File "/fserver/jonathanb/pop/pypop_stuff/pypop/pypop/trace/trace.py", line 139, in _load_trace
    self._gather_statistics()
  File "/fserver/jonathanb/pop/pypop_stuff/pypop/pypop/trace/prvtrace.py", line 119, in _gather_statistics
    self._statistics = self._analyze_tracefile(
  File "/fserver/jonathanb/pop/pypop_stuff/pypop/pypop/trace/prvtrace.py", line 167, in _analyze_tracefile
    stats = [
  File "/fserver/jonathanb/pop/pypop_stuff/pypop/pypop/trace/prvtrace.py", line 169, in <listcomp>
    cut_trace, cfg, index_by_thread=True, statistic_names=[name]
NameError: free variable 'cut_trace' referenced before assignment in enclosing scope