Skip to content

Fix species metadata crash on bundled app#1072

Merged
rly merged 1 commit intomainfrom
fix/species-metadata-error
Mar 8, 2026
Merged

Fix species metadata crash on bundled app#1072
rly merged 1 commit intomainfrom
fix/species-metadata-error

Conversation

@rly
Copy link
Collaborator

@rly rly commented Mar 8, 2026

Summary

  • Add dandischema to modules_to_collect in the PyInstaller spec so its data files (e.g., spdx_license_ids.json) are bundled. This was causing the /dandi/get-recommended-species endpoint to fail with a FileNotFoundError in the packaged app.
  • Add res.ok checks to fetch handlers in globals.ts so that HTTP 500 responses are properly rejected instead of being parsed as JSON and passed to getSpeciesInfo, which crashes on non-array input.

Resolves #1071

Test plan

  • Build the app with PyInstaller and verify /dandi/get-recommended-species returns species data
  • Verify the File Metadata page loads without errors in the bundled app

🤖 Generated with Claude Code

The /dandi/get-recommended-species endpoint failed because dandischema's
data files (spdx_license_ids.json) were not collected by PyInstaller.
Add dandischema to modules_to_collect so its resources are bundled.

Also add res.ok checks to fetch handlers in globals.ts so that HTTP
error responses are properly rejected instead of being parsed as JSON
and stored as non-array values, which caused getSpeciesInfo to crash.

Fixes #1071

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@rly
Copy link
Collaborator Author

rly commented Mar 8, 2026

The windows and mac apps now work with this fix. My plan is to re-tag and re-release 1.10.0 1.1.0 after merging this.

@rly rly requested a review from bendichter March 8, 2026 17:31
@bendichter
Copy link
Collaborator

@rly sounds good. It looks to me like 1.10 was never released in the first place

@rly rly merged commit 72f8b22 into main Mar 8, 2026
29 of 30 checks passed
@rly rly deleted the fix/species-metadata-error branch March 8, 2026 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error in draft 1.1.0 release on File Metadata input

2 participants