@salvadord said:
"[loading] should be as simple as sim.load(json_file) but it seems that loading and instantiating this particular component (a point neuron with a ‘rate’ parameter) is not properly implemented… might be due to some recent changes … can you please add an issue to github and we will check it out… if possible include code or link repo to reproduce the error, thanks"
~/workspace/netpyne-project/venv/lib/python3.7/site-packages/netpyne/sim/wrappers.py in create(netParams, simConfig, output)
48 sim.initialize(netParams, simConfig) # create network object and set cfg and net params
49 pops = sim.net.createPops() # instantiate network populations
---> 50 cells = sim.net.createCells() # instantiate network cells based on defined populations
51 conns = sim.net.connectCells() # create connections between cells based on params
52 stims = sim.net.addStims() # add external stimulation to cells (IClamps etc)
....
~/workspace/netpyne-project/venv/lib/python3.7/site-packages/netpyne/cell/pointCell.py in __init__(self, gid, tags, create, associateGid)
60
61 if create and sim.cfg.createNEURONObj:
---> 62 self.createNEURONObj() # create cell
63 if associateGid: self.associateGid() # register cell for this node
64
~/workspace/netpyne-project/venv/lib/python3.7/site-packages/netpyne/cell/pointCell.py in createNEURONObj(self)
83
84 # if rate is list with 2 items generate random value from uniform
---> 85 if 'rate' in self.params and isinstance(self.params['rate'], list) and len(self.params['rate']) == 2:
86 rand = h.Random()
87 rand.Random123(sim.hashStr('point_rate'), self.gid, sim.cfg.seeds['stim']) # initialize randomizer
Expected behavior
No error and successful loading
System information
iOS 11.4
netpyne 1.0.0.2
NEURON -- VERSION 8.0.0 HEAD (429d11ef) 2021-04-30
Describe the bug
@salvadord said: "[loading] should be as simple as
sim.load(json_file)
but it seems that loading and instantiating this particular component (a point neuron with a ‘rate’ parameter) is not properly implemented… might be due to some recent changes … can you please add an issue to github and we will check it out… if possible include code or link repo to reproduce the error, thanks"The code is in NathanKlineInstitute github so might be private: https://github.com/NathanKlineInstitute/netpyne-STDP/pull/3
Reproducing the bug
The simplified code:
Setup those mod files:
intf7.mod
,nsloc.mod
,stdp.mod
Download this file and rename to.json
: 21may_NetPyNE_project_sim.json.txtSelected Error:
Expected behavior
No error and successful loading
System information