SysBioChalmers / yeast-GEM

The consensus GEM for Saccharomyces cerevisiae
http://sysbiochalmers.github.io/yeast-GEM/
Creative Commons Attribution 4.0 International
94 stars 44 forks source link

unable to locate model when running io.read_yeast_model() in Python #340

Closed qqqtomcat closed 1 year ago

qqqtomcat commented 1 year ago

Hello, I've got the following error while running the code:

model=io.read_yeast_model()

Error message:

Traceback (most recent call last): File "", line 1, in File "C:\Users\alexander.vasilyev\yeast-GEM-main\code\io.py", line 31, in read_yeast_model model = read_sbml_model(MODEL_PATH) File "C:\Users\alexander.vasilyev\Anaconda3\envs\yeast\lib\site-packages\cobra\io\sbml.py", line 460, in read_sbml_model raise e File "C:\Users\alexander.vasilyev\Anaconda3\envs\yeast\lib\site-packages\cobra\io\sbml.py", line 457, in read_sbml_model doc = _get_doc_from_filename(filename) File "C:\Users\alexander.vasilyev\Anaconda3\envs\yeast\lib\site-packages\cobra\io\sbml.py", line 505, in _get_doc_from_filename raise IOError( OSError: The file with '/model/yeast-GEM.xml' does not exist, or is not an SBML string. Provide the path to an existing SBML file or a valid SBML string representation:

Is there any way to fix it? My python verison 3.8, all requirements are satisfied.

edkerk commented 1 year ago

As currently only mentioned under Developer, you should run touch .env in the yeast-GEM folder before using the Python functions.

I will modify the README to make this more clear.