Skip to content

Commit a38a0bf

Browse files
bendichterclaude
andcommitted
Fix DANDI sandbox upload broken by dandi-cli 0.73.2
dandi-cli 0.73.2 (released Nov 15, 2025) changed API key lookup from the generic DANDI_API_KEY env var to instance-specific env vars (e.g. DANDI_SANDBOX_API_KEY for the sandbox). This broke sandbox uploads because nwb-guide only set DANDI_API_KEY. Now set both DANDI_API_KEY and DANDI_SANDBOX_API_KEY when uploading to the sandbox, maintaining compatibility with both old and new dandi. See: dandi/dandi-cli#1731 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent b994976 commit a38a0bf

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/pyflask/manageNeuroconv/manage_neuroconv.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff 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"
@@ -1385,7 +1388,10 @@ def upload_project_to_dandi(
13851388

13861389
# CONVERSION_SAVE_FOLDER_PATH.mkdir(exist_ok=True, parents=True) # Ensure base directory exists
13871390

1388-
os.environ["DANDI_API_KEY"] = api_key # Update API Key
1391+
# Set API key env var for both old (< 0.73.2) and new dandi versions
1392+
os.environ["DANDI_API_KEY"] = api_key
1393+
if sandbox:
1394+
os.environ["DANDI_SANDBOX_API_KEY"] = api_key
13891395

13901396
if ignore_cache:
13911397
os.environ["DANDI_CACHE"] = "ignore"

0 commit comments

Comments
 (0)