Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Error while copying model using model.copy() #72

@cdiener

Description

@cdiener

Discussed in #69

Originally posted by anubhavdas0907 March 8, 2022
Hello Christian,

I was trying to copy a community model to a different variable, but I get an error.
I want to manipulate a model, without changing the original one.

Following are the details.

from micom import load_pickle
model = load_pickle("ERR1883210.pickle")
model_1 = model.copy()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/data/Conda_base/envs/MyConda/lib/python3.7/site-packages/cobra/core/model.py", line 321, in copy
    new = self.__class__()
TypeError: __init__() missing 1 required positional argument: 'taxonomy'

Can you please suggest, what's wrong in this code, and what can be the solution?

Regards
Anubhav

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