ecell / ecell4

An integrated software environment for multi-algorithm, multi-timescale, multi-spatial-representation simulation of various cellular phenomena
https://ecell4.e-cell.org/
GNU General Public License v3.0
17 stars 9 forks source link

AttributeError: 'ecell4_base.core.NetworkModel' object has no attribute 'is_static' #96

Closed kozo2 closed 3 years ago

kozo2 commented 3 years ago

I got the following error with this code.

%matplotlib inline
from ecell4.prelude import *

with reaction_rules():
    A + B == C | (0.01, 0.3)

run_simulation(10, {'A': 60, 'B': 60})
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-1-b1a903e2ab04> in <module>
      5     A + B == C | (0.01, 0.3)
      6 
----> 7 run_simulation(10, {'A': 60, 'B': 60})

~\miniconda3\lib\site-packages\ecell4\util\simulation.py in run_simulation(t, y0, volume, model, solver, ndiv, species_list, structures, observers, rndseed)
    140     """
    141     session = Session(model=model, y0=y0, structures=structures, volume=volume)
--> 142     ret = session.run(
    143         t, solver=solver, rndseed=rndseed, ndiv=ndiv, species_list=species_list, observers=observers)
    144     return ret

~\miniconda3\lib\site-packages\ecell4\util\session.py in run(self, t, solver, rndseed, ndiv, species_list, observers)
    408         observers = (obs, ) + tuple(observers)
    409 
--> 410         if isinstance(f, ecell4_base.ode.ODEFactory) and not self.model.is_static():
    411             warnings.warn("The ODE solver requires a `NetworkModel`. Use `expand`.")
    412             model = self.model.expand(w.list_species())

AttributeError: 'ecell4_base.core.NetworkModel' object has no attribute 'is_static'

I'm using

ecell4                 1.2.0
ecell4-base            2.0.5
kozo2 commented 3 years ago

This was because I didn't update the version of echol4_base. Close this issue.