Skip to content

Runtime error when attempting to remove genes from model #29

Description

@djinnome

Hi folks,

If you do the following in the Docker image:

import pickle, cobrame
with open('/home/meuser/me_models/iJL1678b.pickle', 'rb') as f:
     me = pickle.load(f)
     me.remove_genes_from_model( ['b0002'] )

Then I get the following error:

Complex (ASPKINIHOMOSERDEHYDROGI-CPLX) removed from model
Traceback (most recent call last):
  File "/source/cobrame/cobrame/core/model.py", line 385, in remove_genes_from_model
    from optlang.interface import SymbolicParameter
ImportError: cannot import name 'SymbolicParameter'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/source/cobrame/cobrame/core/model.py", line 387, in remove_genes_from_model
    protein.remove_from_model(method='destructive')
  File "/usr/lib/python3.6/site-packages/cobra-0.5.11-py3.6-linux-x86_64.egg/cobra/core/Metabolite.py", line 142, in remove_from_model
    for x in self._reaction:
RuntimeError: Set changed size during iteration

Please advise

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions