Description of problem
I am loading a network from a saved file. Each time I load it, I get a KeyError for the key ‘delay’. I’m not sure why or how I can fix this. Before (about a year ago) it used to work, but now it doesn’t. I suspect it has to do with a newer Brian code that removed, added, or changed key names.
Is there a way I can manually add or remove the key (whichever one is causing the issue) in my old network save so it works?
The trace is as follows:
Traceback (most recent call last):
File “/home/david/anaconda3/envs/myEnv/lib/python2.7/multiprocessing/process.py”, line 267, in _bootstrap
self.run()
File “/home/david/anaconda3/envs/myEnv/lib/python2.7/multiprocessing/process.py”, line 114, in run
self._target(*self._args, **self._kwargs)
File “/home/david//code/brian/stdp_w_stp_general/my_sim.py”, line 760, in my_sim
net.restore(filename = restore_state_filename)
File “/home/david/anaconda3/envs/myEnv/lib/python2.7/site-packages/brian2/core/base.py”, line 278, in device_override_decorated_function
return func(*args, **kwds)
File “/home/david/anaconda3/envs/myEnv/lib/python2.7/site-packages/brian2/core/network.py”, line 578, in restore
obj._restore_from_full_state(state[obj.name])
File “/home/david/anaconda3/envs/myEnv/lib/python2.7/site-packages/brian2/groups/group.py”, line 594, in _restore_from_full_state
var = self.variables[var_name]
File “/home/david/anaconda3/envs/myEnv/lib/python2.7/site-packages/brian2/core/variables.py”, line 1412, in getitem
return self._variables[item]
KeyError: ‘delay’