cobrapy icon indicating copy to clipboard operation
cobrapy copied to clipboard

can not charge model in Memote

Open mascencio27 opened this issue 2 years ago • 3 comments

Hi, i am trying charge a model in Memote, but, say the error:

(base) C:\Users\user>memote report snapshot C:\Users\user\Documents\MATLAB\BORRADOR_RH16\raeu_2909v6.xml critical: The model could not be loaded due to the following SBML errors. error: Something went wrong reading the SBML model. Most likely the SBML model is not valid. Please check that your model is valid using the cobra.io.sbml.validate_sbml_model function or via the online validator at http://sbml.org/validator . error: (model, errors) = validate_sbml_model(filename) error: If the model is valid and cannot be read please open an issue at https://github.com/opencobra/cobrapy/issues . error: Line 50970, Column 73 - #1006: XML content is not well-formed. error: - Category: XML content, Severity: 2

However, to charge into http://sbml.org/validator, say: "The file you uploaded is an SBML Level 3 Version 1"

And i not know what happen.

I help me, please!

Thanks you very much!

mascencio27 avatar Jun 08 '22 15:06 mascencio27

Can you provide the full code block for reading the model? Also does the SBML validator show any other warnings or errors or does it just state that the model is valid SBML?

cdiener avatar Jun 29 '22 18:06 cdiener

The problem is that the model is not valid XML most likely due to missing brackets and tags. It depends on how the xml parsing libraries deal with this. E.g. lxml is just dropping things it can't read, i.e. if you have something such as

<sbml><model> ..... </modl></sbml>

it will likely just drop the complete tag because it is corrupt. The online validator sees then only an empty tag without model which is valid SBML :/. You have to first ensure that your file is valid XML otherwise anything can happen during the XML parsing.

matthiaskoenig avatar Jun 29 '22 23:06 matthiaskoenig

Can you provide the full code block for reading the model? Also does the SBML validator show any other warnings or errors or does it just state that the model is valid SBML? Thank you for your response. Attach the screen the SBML validator.

imagen

mascencio27 avatar Jul 29 '22 16:07 mascencio27