cnr-ibf-pa / hbp-bsp-issues

Ticketing system for developers/testers and power users of the Brain Simulation Platform of the Human Brain Project
4 stars 0 forks source link

Wrong hostname in NIP-service request #201

Closed alex4200 closed 6 years ago

alex4200 commented 6 years ago

In the notebook 'Cell Placement Hippocampus' a request is being made which is using a wrong hostname:

http://voxels-nip.nexus.apps.bbp.epfl.ch/api/analytics/atlas/download?uri=9B1F97DD-13B8-4FCF-B9B1-59E4EBE4B5D8/brain_regions/brain_region/200.nrrd

This happens in the cell before '_volumefilename' is defined. The reason for that is that before a correct request is being made as follows:

https://nip.humanbrainproject.eu/api/analytics/atlas/releases/9B1F97DD-13B8-4FCF-B9B1-59E4EBE4B5D8/data?brain_region=200

which in turn returns a json with the 'incorrect' hostname. Suggested solution:

replace_URL = "http://voxels-nip.nexus.apps.bbp.epfl.ch:80/api/analytics"
data_nrrd_url = [item['url'] for item in data_urls if item['data_type'] == 'brain_regions'][0]
my_data = requests.get(data_nrrd_url.replace(replace_URL, NIP_URL))

(or any better pythonic solution ...)

alex4200 commented 6 years ago

is covered by #118