Closed siddC closed 6 years ago
For the following TypeError
exceptions:
_______________ test_biomass_precursors_open_production[BIOMASS_Ec_iJO1366_WT_53p95M] _______________
memote/suite/tests/test_biomass.py:196: in test_biomass_precursors_open_production
ann["metric"][reaction_id],
E TypeError: 'float' object is not subscriptable
______________ test_biomass_precursors_open_production[BIOMASS_Ec_iJO1366_core_53p95M] ______________
memote/suite/tests/test_biomass.py:196: in test_biomass_precursors_open_production
ann["metric"][reaction_id],
E TypeError: 'float' object is not subscriptable
the issue seems to stem from test_biomass_precursors_open_production
. As can be seen in the details tab, this function has an issue with ann["metric"][reaction_id]
because ann["metric"][reaction_id]
is not defined anywhere in the function at all.
The problem seems to be that the @annotate
decorator is missing an argument metric=dict()
which should definitely be set before using it in the message. Something like:
ann["metric"][reaction_id] = len(blocked_precursors) / len(all_precursors)
Problem description
Running
memote report snapshot -a "-vv"
on the iJO 1366 model results in 8TypeError
exceptions. All the errors occur intest_biomass.py
. The specific functions these exceptions occur for are:test_biomass_precursors_default_production
test_biomass_precursors_open_production
test_direct_metabolites_in_biomass
test_essential_precursors_not_in_biomass
The specific error messages given are:
E TypeError: 'float' object does not support item assignment
for
test_biomass_precursors_default_production
andtest_biomass_precursors_open_production
and:E TypeError: unsupported format string passed to dict.__format__
for
test_direct_metabolites_in_biomass
andtest_essential_precursors_not_in_biomass
The reactions for these
TypeError
exceptions occur for areBIOMASS_Ec_iJO1366_core_53p95M
andBIOMASS_Ec_iJO1366_WT_53p95M