Error while creating/deleting a population


#1

Hello,

I recently updated the Platform to the latest version. Since then I am having issues while configuring populations. After naming/removing a population in the GUI the Apply button is stuck at “Applying changes”. If I refresh the page, I can see the added population in the brain editor but they are not available in the TF Editor.

This is the output I get when this error happens:

2018-11-28 14:01:53 GMT+0100 [ERROR] TypeError: Cannot read property 'file' of undefined
TypeError: Cannot read property 'file' of undefined
    at CloneExperimentService.setBrain (/home/bibi/Documents/NRP/nrpBackendProxy/proxy/ExperimentServiceFactory.js:271:42)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
2018-11-28 14:01:55,793 [Thread-48   ] [hbp_nrp_cles] [ERROR]  'NoneType' object has no attribute 'keys'
Traceback (most recent call last):
  File "/home/bibi/Documents/NRP/ExDBackend/hbp_nrp_cleserver/hbp_nrp_cleserver/server/ROSCLEServer.py", line 479, in __set_brain
    err = self.__check_set_brain(data_type, brain_populations, change_population)
  File "/home/bibi/Documents/NRP/ExDBackend/hbp_nrp_cleserver/hbp_nrp_cleserver/server/ROSCLEServer.py", line 522, in __check_set_brain
    old_populations = [str(item) for item in tf_framework.get_brain_populations().keys()]
AttributeError: 'NoneType' object has no attribute 'keys'
[ERROR] [1543410115.793633]: Error processing request: local variable 'tmp' referenced before assignment
['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/bibi/Documents/NRP/ExDBackend/hbp_nrp_cleserver/hbp_nrp_cleserver/server/ROSCLEServer.py", line 445, in __try_set_brain\n    request.change_population)\n', '  File "/home/bibi/Documents/NRP/ExDBackend/hbp_nrp_cleserver/hbp_nrp_cleserver/server/ROSCLEServer.py", line 498, in __set_brain\n    line_no = extract_line_number(sys.exc_info()[2], tmp.name)\n', "UnboundLocalError: local variable 'tmp' referenced before assignment\n"]
2018-11-28 14:01:55,793 [Thread-48   ] [rosout      ] [ERROR]  Error processing request: local variable 'tmp' referenced before assignment
['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/bibi/Documents/NRP/ExDBackend/hbp_nrp_cleserver/hbp_nrp_cleserver/server/ROSCLEServer.py", line 445, in __try_set_brain\n    request.change_population)\n', '  File "/home/bibi/Documents/NRP/ExDBackend/hbp_nrp_cleserver/hbp_nrp_cleserver/server/ROSCLEServer.py", line 498, in __set_brain\n    line_no = extract_line_number(sys.exc_info()[2], tmp.name)\n', "UnboundLocalError: local variable 'tmp' referenced before assignment\n"]
2018-11-28 14:01:55,794 [uWSGIWorker1] [hbp_nrp_back] [ERROR]  Error executing service "/ros_cle_simulation/0/set_brain", unable to communicate with the CLE.
Error: service [/ros_cle_simulation/0/set_brain] responded with an error: error processing request: local variable 'tmp' referenced before assignment
2018-11-28 14:01:55,794 [uWSGIWorker1] [hbp_nrp_back] [ERROR]  Error executing service "/ros_cle_simulation/0/set_brain", unable to communicate with the CLE.
Error: service [/ros_cle_simulation/0/set_brain] responded with an error: error processing request: local variable 'tmp' referenced before assignment
Traceback (most recent call last):
  File "/home/bibi/.opt/platform_venv/lib/python2.7/site-packages/flask/app.py", line 1813, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/bibi/.opt/platform_venv/lib/python2.7/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/bibi/.opt/platform_venv/lib/python2.7/site-packages/flask_restful/__init__.py", line 480, in wrapper
    resp = resource(*args, **kwargs)
  File "/home/bibi/.opt/platform_venv/lib/python2.7/site-packages/flask/views.py", line 88, in view
    return self.dispatch_request(*args, **kwargs)
  File "/home/bibi/.opt/platform_venv/lib/python2.7/site-packages/flask_restful/__init__.py", line 595, in dispatch_request
    resp = meth(*args, **kwargs)
  File "./hbp_nrp_backend/rest_server/__SimulationBrainFile.py", line 267, in put
    body['change_population'])
  File "./hbp_nrp_backend/cle_interface/ROSCLEClient.py", line 288, in set_simulation_brain
    change_population)
  File "./hbp_nrp_backend/cle_interface/ROSCLEClient.py", line 122, in __call__
    raise ROSCLEClientException(message)
ROSCLEClientException: Error executing service "/ros_cle_simulation/0/set_brain", unable to communicate with the CLE.
Error: service [/ros_cle_simulation/0/set_brain] responded with an error: error processing request: local variable 'tmp' referenced before assignment

If I manually edit the population name and range in the BIBI configuration file, these changes also won’t be displayed in the TF Editor and they in fact aren’t seen from the transfer functions as I get the errors like “‘module’ object hat no attribute ‘actors’”.

I tried reinstalling ExDBackend and CLE (rm -rf then git clone) but I still get the same error.

Thanks in advance for your help!
Ali


#2

Dear Ali,

In the current version of the NRP, that is

Frontend: 2.1.0
Backend:
	hbp_nrp_cleserver: 2.1.0
	hbp_nrp_cle: 2.1.0

it is not possible to rename a population from the GUI or to delete it if it is used by transfer functions. Could you print in this post the version numbers you get when you open the info panel (the “I” button of the vertical toolbar) once the simulation is launched?

Best regards,
Luc


#3

These are the version numbers:

Frontend: 2.1.0
Backend:
	hbp_nrp_cleserver: 2.1.0
	hbp_nrp_cle: 2.1.0
	hbp_nrp_commons: 2.1.0
	hbp_nrp_excontrol: 2.1.0
	hbp_nrp_music_interface: 2.1.0
	hbp_nrp_backend: 2.1.0
	hbp_nrp_music_xml: 2.1.0

I didn’t try to edit the populations after I created the TFs. The populations won’t even show up in the right banner in the TF editor. I concluded that the brain and population configuration are never applied.
Meanwhile I reinstalled the platform and didn’t run into these issues since.

Regards,
Ali