File tree Expand file tree Collapse file tree
src/pyflask/manageNeuroconv Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1354,7 +1354,10 @@ def upload_folder_to_dandi(
13541354) -> list [Path ]:
13551355 from neuroconv .tools .data_transfers import automatic_dandi_upload
13561356
1357- os .environ ["DANDI_API_KEY" ] = api_key # Update API Key
1357+ # Set API key env var for both old (< 0.73.2) and new dandi versions
1358+ os .environ ["DANDI_API_KEY" ] = api_key
1359+ if sandbox :
1360+ os .environ ["DANDI_SANDBOX_API_KEY" ] = api_key
13581361
13591362 if ignore_cache :
13601363 os .environ ["DANDI_CACHE" ] = "ignore"
@@ -1384,8 +1387,10 @@ def upload_project_to_dandi(
13841387 from neuroconv .tools .data_transfers import automatic_dandi_upload
13851388
13861389 # CONVERSION_SAVE_FOLDER_PATH.mkdir(exist_ok=True, parents=True) # Ensure base directory exists
1387-
1388- os .environ ["DANDI_API_KEY" ] = api_key # Update API Key
1390+ # Set API key env var for both old (< 0.73.2) and new dandi versions
1391+ os .environ ["DANDI_API_KEY" ] = api_key
1392+ if sandbox :
1393+ os .environ ["DANDI_SANDBOX_API_KEY" ] = api_key
13891394
13901395 if ignore_cache :
13911396 os .environ ["DANDI_CACHE" ] = "ignore"
You can’t perform that action at this time.
0 commit comments