bulk download key error: token
Posted: Mon Aug 14, 2023 10:36 am
Hello,
I have been trying to get the bulk download python script to run on our lab computers (windows 11), and I am getting this error back. I am able to download using the script on my personal computer (macOS Big Sur 11.7.8).
This is the traceback I am getting:
[ln2] runfile('C:/opencap-processing/batchDownload.py', wdir='C:/opencap-processing')
Login with credentials used at app.opencap.ai.
Visit the website to make an account if you do not have one.
Enter Username:
**************
Enter Password:
********************
Traceback (most recent call last):
File C:\opencap-processing\utilsAuthentication.py:35 in get_token
token = config("API_TOKEN")
File ~\anaconda3\Lib\site-packages\decouple.py:248 in __call__
return self.config(*args, **kwargs)
File ~\anaconda3\Lib\site-packages\decouple.py:107 in __call__
return self.get(*args, **kwargs)
File ~\anaconda3\Lib\site-packages\decouple.py:92 in get
raise UndefinedValueError('{} not found. Declare it as envvar or define a default value.'.format(option))
UndefinedValueError: API_TOKEN not found. Declare it as envvar or define a default value.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File C:\opencap-processing\utilsAuthentication.py:57 in get_token
token = resp['token']
KeyError: 'token'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File ~\anaconda3\Lib\site-packages\spyder_kernels\py3compat.py:356 in compat_exec
exec(code, globals, locals)
File c:\opencap-processing\batchdownload.py:21
from utils import download_session
File C:\opencap-processing\utils.py:37
API_TOKEN = get_token()
File C:\opencap-processing\utilsAuthentication.py:70 in get_token
raise Exception('Login failed.')
Exception: Login failed.
---------------
Any support would be greatly appreciated. We are trying to download sessions with 61 trials, and are unable to download them through the browser option.
Thank you,
Aera
FasTER Lab
I have been trying to get the bulk download python script to run on our lab computers (windows 11), and I am getting this error back. I am able to download using the script on my personal computer (macOS Big Sur 11.7.8).
This is the traceback I am getting:
[ln2] runfile('C:/opencap-processing/batchDownload.py', wdir='C:/opencap-processing')
Login with credentials used at app.opencap.ai.
Visit the website to make an account if you do not have one.
Enter Username:
**************
Enter Password:
********************
Traceback (most recent call last):
File C:\opencap-processing\utilsAuthentication.py:35 in get_token
token = config("API_TOKEN")
File ~\anaconda3\Lib\site-packages\decouple.py:248 in __call__
return self.config(*args, **kwargs)
File ~\anaconda3\Lib\site-packages\decouple.py:107 in __call__
return self.get(*args, **kwargs)
File ~\anaconda3\Lib\site-packages\decouple.py:92 in get
raise UndefinedValueError('{} not found. Declare it as envvar or define a default value.'.format(option))
UndefinedValueError: API_TOKEN not found. Declare it as envvar or define a default value.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File C:\opencap-processing\utilsAuthentication.py:57 in get_token
token = resp['token']
KeyError: 'token'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File ~\anaconda3\Lib\site-packages\spyder_kernels\py3compat.py:356 in compat_exec
exec(code, globals, locals)
File c:\opencap-processing\batchdownload.py:21
from utils import download_session
File C:\opencap-processing\utils.py:37
API_TOKEN = get_token()
File C:\opencap-processing\utilsAuthentication.py:70 in get_token
raise Exception('Login failed.')
Exception: Login failed.
---------------
Any support would be greatly appreciated. We are trying to download sessions with 61 trials, and are unable to download them through the browser option.
Thank you,
Aera
FasTER Lab