You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am facing an issue with pynestml.codegeneration.nest_code_generator_utils. I am trying to run stdp_windows.ipynb in the EBRAIN jupyterlab environment.
When I run this, I get an error that says IndexError. As much as I understand this is happening because the generate_code_for() function tries to find names of neurons and synapses through the findall method from re. In the iaf_psc_delta_neuron.nestml file there is no neuron or synapse name declared. There is model iaf_psc_delta_neuron:. I don't know if I am doing something wrong. Can anyone give me an lead on this?
Hi, I think there is an issue with the versions. It would be great if you could try this with the latest NESTML code from the master branch. Could you try running python3 -m pip install git+https://github.com/nest/nestml/?
I used the master branch to import nestml with the command python3 -m pip install git+https://github.com/nest/nestml/, but I again encountered the same error.
This was done on the EBRAINS platform.
I am facing an issue with pynestml.codegeneration.nest_code_generator_utils. I am trying to run stdp_windows.ipynb in the EBRAIN jupyterlab environment.
module_name, neuron_model_name, synapse_model_name = NESTCodeGeneratorUtils.generate_code_for( "iaf_psc_delta_neuron.nestml", nestml_stdp_model, post_ports=["post_spikes"])
When I run this, I get an error that says IndexError. As much as I understand this is happening because the
generate_code_for()
function tries to find names of neurons and synapses through thefindall
method fromre
. In the iaf_psc_delta_neuron.nestml file there is no neuron or synapse name declared. There ismodel iaf_psc_delta_neuron:
. I don't know if I am doing something wrong. Can anyone give me an lead on this?`---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
Cell In[7], line 1
----> 1 module_name, neuron_model_name, synapse_model_name = NESTCodeGeneratorUtils.generate_code_for(
2 "iaf_psc_delta_neuron.nestml",
3 nestml_stdp_model,
4 post_ports=["post_spikes"])
File /srv/main-spack-instance-2309/spack/var/spack/environments/ebrains-23-09/.spack-env/view/lib/python3.8/site-packages/pynestml/codegeneration/nest_code_generator_utils.py:89, in NESTCodeGeneratorUtils.generate_code_for(cls, nestml_neuron_model, nestml_synapse_model, post_ports, mod_ports, uniq_id, logging_level)
86 nestml_neuron_model = nestml_model_file.read()
88 # update neuron model name inside the file
---> 89 neuron_model_name_orig = re.findall(r"neuron\ [^:\s]:", nestml_neuron_model)[0][7:-1]
90 neuron_model_name_uniq = neuron_model_name_orig + uniq_id
91 nestml_model = re.sub(r"neuron\ [^:\s]:",
92 "neuron " + neuron_model_name_uniq + ":", nestml_neuron_model)
IndexError: list index out of range`
The text was updated successfully, but these errors were encountered: