ukhsa-collaboration / pygom

ODE modelling in Python
GNU General Public License v2.0
27 stars 20 forks source link

RecursionError when unpickeling ode objects #34

Closed twomagpi closed 4 years ago

twomagpi commented 4 years ago

simply save an ode object to a file via pickle and load it back

RecursionError                            Traceback (most recent call last)
<ipython-input-9-dce96bd264f0> in <module>
      1 with open('test.pkl', 'rb') as infile:
----> 2     ode2 = pickle.load(infile)

d:\git\pygom_github\pygom\model\ode_utils\compile_canary.py in __getattr__(self, name)
     60             return self._states
     61 
---> 62         if name in self._states:
     63             return self._states[name]
     64         msg = "'{0}' object has no attribute '{1}'"

d:\git\pygom_github\pygom\model\ode_utils\compile_canary.py in __getattr__(self, name)
     58         '''
     59         if name == '_states':
---> 60             return self._states
     61 
     62         if name in self._states:

... last 1 frames repeated, from the frame below ...

d:\git\pygom_github\pygom\model\ode_utils\compile_canary.py in __getattr__(self, name)
     58         '''
     59         if name == '_states':
---> 60             return self._states
     61 
     62         if name in self._states:

RecursionError: maximum recursion depth exceeded in comparison