opencobra / cobrapy

COBRApy is a package for constraint-based modeling of metabolic networks.
http://opencobra.github.io/cobrapy/
GNU General Public License v2.0
465 stars 218 forks source link

ValueError #1236

Closed dengxiao01 closed 2 years ago

dengxiao01 commented 2 years ago

Problem description

image

Code Sample

Create a minimal, complete, verifiable example.

Context

ValueError: Object has no .reactions attribute. Cannot load.
cdiener commented 2 years ago

This does not look like it is an actual JSON COBRA model in the file. Where did you get this model from, or can you attach it here?

dengxiao01 commented 2 years ago

This does not look like it is an actual JSON COBRA model in the file. Where did you get this model from, or can you attach it here?

this Is derived from the https://modelseed.org/genomes/Plants The json file in the model seed database cannot be uploaded thanks

cdiener commented 2 years ago

Thanks, that helps. It is a bit confusing but even though you can download JSON files from ModelSEED those are not COBRAPY JSON models but just the ModelSEED data in JSON format. So you waon't be abble to read those files with COBRAPY. The SBML file should be readable but as pointed out by the other issue they have duplicated IDs which is a bug in ModelSEED.