opencobra / cobrapy

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

ContainerAlreadyContains error with the fastcc() #1334

Closed Alvis-Jiang closed 1 year ago

Alvis-Jiang commented 1 year ago

Hi

I am currently using cobrapy but came across some errors with the fastcc( ) module, which is "ContainerAlreadyContains: Container '' already contains an object with name 'constraint_r0998'."

I am using Python 3.8. Could you help me to figure out this issue? Any feedback will be greatly appreciated! WeChat Screenshot_20230520151354

cdiener commented 1 year ago

Our apologies, the FastCC code is currently a bit buggy and does not work correctly. It is on our radar to fix it though... You can use the find_blocked_reactions function in the meantime which should work.

cdiener commented 1 year ago

Sorry, just saw similar errors pop up elsewhere. That particular error should be fixed by downgrading sympy to 1.11.1 (`pip install "sympy==1.11.1". After that the function should run, but the results will likely not be correct.

Alvis-Jiang commented 1 year ago

Got it, thanks a lot for your help!