[CLOSED] Cannot edit brain file from vrtual coach


#1

Hello,
I am running a simulation using the virtual coach. I have the docker installation of the NRP but the jupyter notebook I am using runs outside any containers. I have no problems with launching and stoping the simulation or editing transfer functions but when I try to edit the brain file I get an error:

sim.edit_brain("anything")

---------------------------------------------------------------------------

INFO: [2022-04-27 19:23:14,112 - Simulation (snntp_detect_0 - 172.19.0.3 #0)] Attempting to retrieve brain
INFO: [2022-04-27 19:23:14,135 - Simulation (snntp_detect_0 - 172.19.0.3 #0)] Attempting to set Brain
INFO: [2022-04-27 19:23:14,135 - Simulation (snntp_detect_0 - 172.19.0.3 #0)] Attempting to retrieve brain
INFO: [2022-04-27 19:23:14,146 - Simulation (snntp_detect_0 - 172.19.0.3 #0)] Attempting to retrieve brain
INFO: [2022-04-27 19:23:14,153 - Simulation (snntp_detect_0 - 172.19.0.3 #0)] Attempting to retrieve brain
INFO: [2022-04-27 19:23:14,161 - Simulation (snntp_detect_0 - 172.19.0.3 #0)] Attempting to retrieve brain

---------------------------------------------------------------------------
Exception                                 Traceback (most recent call last)
<ipython-input-7-c96bd3940237> in <module>
----> 1 sim.edit_brain("anything")

~/Documents/NRP/VirtualCoach/hbp_nrp_virtual_coach/pynrp/simulation.py in edit_brain(self, brain_script)
    819         :param brain_script: A string containing the new pyNN script.
    820         ""
--> 821         self.__set_brain(brain_script, self.get_populations())
    822 
    823     def get_populations(self):

~/Documents/NRP/VirtualCoach/hbp_nrp_virtual_coach/pynrp/simulation.py in __set_brain(self, brain_script, neural_population)
    786             status_code, _ = self.__http_client.put(url, body=body)
    787             if status_code != http.client.OK:
--> 788                 raise Exception(
    789                     "Unable to set Brain, HTTP status %s" % status_code)
    790             self.__logger.info("Brain successfully updated.")

Exception: Unable to set Brain, HTTP status 400

I would be grateful for any advice on what could fix this.


#2

Hi,

Sorry to read that.

Does the same brain script get applied successfully from the web app?

Cheers,

Ugo


#3

Ok, apparently there was a typo in the string. Thanks.