[SOLVED] DictError in SetStatus_id: Unused dictionary items: min_delay max_delay


#1

Hi,

I updated my repositories with the scrip in user-scripts yesterday (./update_nrp update all). Since then, I can not launch some experiments,
particularly the iCup Template Experiment. The problem arises from the Models/brain_models/idle_brain.py file,
which sets up the simulation with the parameters min_delay and max_delay.

The relevant part of the stack trace looks as follows:

2017-11-24 00:05:03,057 [Thread-33   ] [hbp_nrp_cles] [ERROR]  Initialization failed
Traceback (most recent call last):
  File "/home/hbp/NRP/ExDBackend/hbp_nrp_cleserver/hbp_nrp_cleserver/server/ROSCLESimulationFactory.py", line 183, in create_new_simulation
    cle_launcher.cle_function_init(environment_file, timeout, self.except_hook)
  File "/home/hbp/NRP/ExDBackend/hbp_nrp_cleserver/hbp_nrp_cleserver/server/CLELauncher.py", line 206, in cle_function_init
    brainfile, brainconf, robot_pose, models, lights)
  File "/home/hbp/NRP/ExDBackend/hbp_nrp_cleserver/hbp_nrp_cleserver/server/CLELauncher.py", line 536, in __load_cle
    cle.initialize(brain_file_path, **neurons_config)
  File "/home/hbp/NRP/CLE/hbp_nrp_cle/hbp_nrp_cle/cle/ClosedLoopEngine.py", line 144, in initialize
    self.bca.load_brain(network_file, **configuration)
  File "/home/hbp/NRP/CLE/hbp_nrp_cle/hbp_nrp_cle/brainsim/pynn/PyNNControlAdapter.py", line 72, in load_brain
    **self.populations_using_python_slice(populations)
  File "/home/hbp/NRP/CLE/hbp_nrp_cle/hbp_nrp_cle/brainsim/pynn/PyNNControlAdapter.py", line 103, in __load_python_brain
    BrainLoader.load_py_network(network_file, **populations)
  File "/home/hbp/NRP/CLE/hbp_nrp_cle/hbp_nrp_cle/brainsim/pynn/PyNNBrainLoader.py", line 233, in load_py_network
    brain_module = imp.load_source('__brain_model' + str(__brainIndex), path)
  File "/home/hbp/NRP/Models/brain_model/idle_brain.py", line 61, in <module>
    circuit = create_brain()
  File "/home/hbp/NRP/Models/brain_model/idle_brain.py", line 20, in create_brain
    sim.setup(timestep=0.1, min_delay=0.1, max_delay=20.0, threads=1, rng_seeds=[1234])
  File "/home/hbp/NRP/CLE/hbp_nrp_cle/hbp_nrp_cle/brainsim/__simulator.py", line 83, in nrp_pynn_setup
    return pynn_setup(timestep, min_delay, **extra_params)
  File "/home/hbp/.local/lib/python2.7/site-packages/pyNN/nest/__init__.py", line 139, in setup
    simulator.state.set_delays(min_delay, max_delay)
  File "/home/hbp/.local/lib/python2.7/site-packages/pyNN/nest/simulator.py", line 89, in set_delays
    'max_delay': max_delay})
  File "/home/hbp/.local/lib/python2.7/site-packages/nest/lib/hl_api_helper.py", line 230, in stack_checker_func
    return f(*args, **kwargs)
  File "/home/hbp/.local/lib/python2.7/site-packages/nest/lib/hl_api_simulation.py", line 86, in SetKernelStatus
    sr('SetStatus')
  File "/home/hbp/.local/lib/python2.7/site-packages/nest/__init__.py", line 117, in catching_sli_run
    raise _kernel.NESTError(encode(errorstring))
NESTError: DictError in SetStatus_id: Unused dictionary items:  min_delay max_delay
(<class 'pynestkernel.NESTError'>, NESTError('DictError in SetStatus_id: Unused dictionary items:  min_delay max_delay',), <traceback object at 0x7f10ac3eefc8>)
[ERROR] [1511478303.058735]: Error processing request: DictError in SetStatus_id: Unused dictionary items:  min_delay max_delay
['Traceback (most recent call last):\n', '  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/impl/tcpros_service.py", line 625, in _handle_request\n    response = convert_return_to_response(self.handler(request), self.response_class)\n', '  File "/home/hbp/NRP/ExDBackend/hbp_nrp_cleserver/hbp_nrp_cleserver/server/ROSCLESimulationFactory.py", line 183, in create_new_simulation\n    cle_launcher.cle_function_init(environment_file, timeout, self.except_hook)\n', '  File "/home/hbp/NRP/ExDBackend/hbp_nrp_cleserver/hbp_nrp_cleserver/server/CLELauncher.py", line 206, in cle_function_init\n    brainfile, brainconf, robot_pose, models, lights)\n', '  File "/home/hbp/NRP/ExDBackend/hbp_nrp_cleserver/hbp_nrp_cleserver/server/CLELauncher.py", line 536, in __load_cle\n    cle.initialize(brain_file_path, **neurons_config)\n', '  File "/home/hbp/NRP/CLE/hbp_nrp_cle/hbp_nrp_cle/cle/ClosedLoopEngine.py", line 144, in initialize\n    self.bca.load_brain(network_file, **configuration)\n', '  File "/home/hbp/NRP/CLE/hbp_nrp_cle/hbp_nrp_cle/brainsim/pynn/PyNNControlAdapter.py", line 72, in load_brain\n    **self.populations_using_python_slice(populations)\n', '  File "/home/hbp/NRP/CLE/hbp_nrp_cle/hbp_nrp_cle/brainsim/pynn/PyNNControlAdapter.py", line 103, in __load_python_brain\n    BrainLoader.load_py_network(network_file, **populations)\n', '  File "/home/hbp/NRP/CLE/hbp_nrp_cle/hbp_nrp_cle/brainsim/pynn/PyNNBrainLoader.py", line 233, in load_py_network\n    brain_module = imp.load_source(\'__brain_model\' + str(__brainIndex), path)\n', '  File "/home/hbp/NRP/Models/brain_model/idle_brain.py", line 61, in <module>\n    circuit = create_brain()\n', '  File "/home/hbp/NRP/Models/brain_model/idle_brain.py", line 20, in create_brain\n    sim.setup(timestep=0.1, min_delay=0.1, max_delay=20.0, threads=1, rng_seeds=[1234])\n', '  File "/home/hbp/NRP/CLE/hbp_nrp_cle/hbp_nrp_cle/brainsim/__simulator.py", line 83, in nrp_pynn_setup\n    return pynn_setup(timestep, min_delay, **extra_params)\n', '  File "/home/hbp/.local/lib/python2.7/site-packages/pyNN/nest/__init__.py", line 139, in setup\n    simulator.state.set_delays(min_delay, max_delay)\n', '  File "/home/hbp/.local/lib/python2.7/site-packages/pyNN/nest/simulator.py", line 89, in set_delays\n    \'max_delay\': max_delay})\n', '  File "/home/hbp/.local/lib/python2.7/site-packages/nest/lib/hl_api_helper.py", line 230, in stack_checker_func\n    return f(*args, **kwargs)\n', '  File "/home/hbp/.local/lib/python2.7/site-packages/nest/lib/hl_api_simulation.py", line 86, in SetKernelStatus\n    sr(\'SetStatus\')\n', '  File "/home/hbp/.local/lib/python2.7/site-packages/nest/__init__.py", line 117, in catching_sli_run\n    raise _kernel.NESTError(encode(errorstring))\n', 'NESTError: DictError in SetStatus_id: Unused dictionary items:  min_delay max_delay\n']
2017-11-24 00:05:03,058 [Thread-33   ] [rosout      ] [ERROR]  Error processing request: DictError in SetStatus_id: Unused dictionary items:  min_delay max_delay
['Traceback (most recent call last):\n', '  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/impl/tcpros_service.py", line 625, in _handle_request\n    response = convert_return_to_response(self.handler(request), self.response_class)\n', '  File "/home/hbp/NRP/ExDBackend/hbp_nrp_cleserver/hbp_nrp_cleserver/server/ROSCLESimulationFactory.py", line 183, in create_new_simulation\n    cle_launcher.cle_function_init(environment_file, timeout, self.except_hook)\n', '  File "/home/hbp/NRP/ExDBackend/hbp_nrp_cleserver/hbp_nrp_cleserver/server/CLELauncher.py", line 206, in cle_function_init\n    brainfile, brainconf, robot_pose, models, lights)\n', '  File "/home/hbp/NRP/ExDBackend/hbp_nrp_cleserver/hbp_nrp_cleserver/server/CLELauncher.py", line 536, in __load_cle\n    cle.initialize(brain_file_path, **neurons_config)\n', '  File "/home/hbp/NRP/CLE/hbp_nrp_cle/hbp_nrp_cle/cle/ClosedLoopEngine.py", line 144, in initialize\n    self.bca.load_brain(network_file, **configuration)\n', '  File "/home/hbp/NRP/CLE/hbp_nrp_cle/hbp_nrp_cle/brainsim/pynn/PyNNControlAdapter.py", line 72, in load_brain\n    **self.populations_using_python_slice(populations)\n', '  File "/home/hbp/NRP/CLE/hbp_nrp_cle/hbp_nrp_cle/brainsim/pynn/PyNNControlAdapter.py", line 103, in __load_python_brain\n    BrainLoader.load_py_network(network_file, **populations)\n', '  File "/home/hbp/NRP/CLE/hbp_nrp_cle/hbp_nrp_cle/brainsim/pynn/PyNNBrainLoader.py", line 233, in load_py_network\n    brain_module = imp.load_source(\'__brain_model\' + str(__brainIndex), path)\n', '  File "/home/hbp/NRP/Models/brain_model/idle_brain.py", line 61, in <module>\n    circuit = create_brain()\n', '  File "/home/hbp/NRP/Models/brain_model/idle_brain.py", line 20, in create_brain\n    sim.setup(timestep=0.1, min_delay=0.1, max_delay=20.0, threads=1, rng_seeds=[1234])\n', '  File "/home/hbp/NRP/CLE/hbp_nrp_cle/hbp_nrp_cle/brainsim/__simulator.py", line 83, in nrp_pynn_setup\n    return pynn_setup(timestep, min_delay, **extra_params)\n', '  File "/home/hbp/.local/lib/python2.7/site-packages/pyNN/nest/__init__.py", line 139, in setup\n    simulator.state.set_delays(min_delay, max_delay)\n', '  File "/home/hbp/.local/lib/python2.7/site-packages/pyNN/nest/simulator.py", line 89, in set_delays\n    \'max_delay\': max_delay})\n', '  File "/home/hbp/.local/lib/python2.7/site-packages/nest/lib/hl_api_helper.py", line 230, in stack_checker_func\n    return f(*args, **kwargs)\n', '  File "/home/hbp/.local/lib/python2.7/site-packages/nest/lib/hl_api_simulation.py", line 86, in SetKernelStatus\n    sr(\'SetStatus\')\n', '  File "/home/hbp/.local/lib/python2.7/site-packages/nest/__init__.py", line 117, in catching_sli_run\n    raise _kernel.NESTError(encode(errorstring))\n', 'NESTError: DictError in SetStatus_id: Unused dictionary items:  min_delay max_delay\n']

The easy solution is to remove both these parameters from the idle_brain.py file (which works), but I imagine that somebody put them there on purpose.
Since the last commit on that file is 2016-09-06, and NEST has the latest commit on master 10 days ago, I do not know where this issue comes from.


#2

Hi,

I don’t know yet what the problem is, but you also need to run ./update_nrp build all (this takes few minutes).
Best regards,
Luc


#3

Thanks, I also ran build all, but that did not fix the problem.


#4

It looks like a mismatch between the versions of PyNN and NEST. Which versions are you using?


#5

PyNN 0.9.1 and NEST version 2.10.0 from November 24th 2017.


#6

That perhaps explains it. PyNN 0.8.3 and later require NEST 2.12.0.


#7

Yes, it worked with updating NEST. However, not when using the script, but with pip directly. (This was previous to upgrading the whole NRP to NEST 2.12)