FZJ-INM1-BDA / siibra-toolbox-neuroimaging

siibra toolbox for assignment of neuroimaging signals to brain regions
Apache License 2.0
0 stars 0 forks source link

commandline call > siibra assign nifti <filename>.nii.gz does not work, because of missing auth_token (Windows) #5

Open SBludau opened 2 years ago

SBludau commented 2 years ago

Hi, I tried the command line call

siibra assign nifti .nii.gz

and received the following error. The error makes sense, since I did not pass an auth_thoken, but it is not described how to pass the token.

"Authorization": f"Bearer {self.kg_token}", File "C:\Users...\AppData\Local\Programs\Python\Python310\lib\site-packages\siibra\retrieval\requests.py", line 304, in kg_token raise RuntimeError( RuntimeError: No access token for EBRAINS Knowledge Graph found. If you do not have an EBRAINS account, please first register at https://ebrains.eu/register. Then, use one of the following option:

  1. Let siibra get you a token by passing your username and password, using siibra.fetch_ebrains_token()
  2. If you know how to get a token yourself, set it as $HBP_AUTH_TOKEN or siibra.set_ebrains_token()
  3. If you are an application developer, you might configure keycloak access by setting $KEYCLOAK_ENDPOINT, $KEYCLOAK_CLIENT_ID and $KEYCLOAK_CLIENT_SECRET.
dickscheid commented 2 years ago

This has to be fixed in siibra-python, but: Isn't the message explaining how to pass the token?

There is a recent problem with the solution under 1. since EBRAINS closed down the token endpoint in the data proxy. @skoehnen was that fixed, or do we have to remove the fetch_ebrains_token method?

But 2./3. should work. We should add an additional hint where to take the token. It is described in the siibra python documentation at https://siibra-python.readthedocs.io/en/latest/start.html

SBludau commented 2 years ago

Hi, I would know how to use hint 1 and 2 in a python notebook, but where should I pass the token in the command line call? siibra assign nifti .nii.gz