opencobra / memote

memote – the genome-scale metabolic model test suite
https://memote.readthedocs.io/
Apache License 2.0
123 stars 26 forks source link

KeyError: 'metric' #700

Open AgustinPardo opened 3 years ago

AgustinPardo commented 3 years ago

Hello,

I run:

memote report snapshot --filename "report.html" iEK1008.xml 

I get this:

/home/agustin/.local/lib/python3.6/site-packages/optlang/glpk_interface.py:688: KeyboardInterrupt
(to show a full traceback on KeyboardInterrupt use --full-trace)
================================ 55 failed, 43 passed in 102.67s (0:01:42) =================================
Writing snapshot report to 'report.html'.
Traceback (most recent call last):
  File "/home/agustin/.local/bin/memote", line 8, in <module>
    sys.exit(cli())
  File "/home/agustin/.local/lib/python3.6/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/agustin/.local/lib/python3.6/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/agustin/.local/lib/python3.6/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/agustin/.local/lib/python3.6/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/agustin/.local/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/agustin/.local/lib/python3.6/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/agustin/.local/lib/python3.6/site-packages/memote/suite/cli/reports.py", line 124, in snapshot
    file_handle.write(api.snapshot_report(results, config))
  File "/home/agustin/.local/lib/python3.6/site-packages/memote/suite/api.py", line 146, in snapshot_report
    report = SnapshotReport(result=result, configuration=config)
  File "/home/agustin/.local/lib/python3.6/site-packages/memote/suite/reporting/snapshot.py", line 47, in __init__
    self.compute_score()
  File "/home/agustin/.local/lib/python3.6/site-packages/memote/suite/reporting/report.py", line 126, in compute_score
    metric = result["metric"]
KeyError: 'metric'

How could I solve the issue?

Midnighter commented 3 years ago

Is this the model http://bigg.ucsd.edu/models/iEK1008 ? I'll take a look.

AgustinPardo commented 3 years ago

Yes, that is the model!