GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Draft: Update zenodo response https status handlinbg by ErikGro · Pull Request #191 · BrainLesion/preprocessing

Conversation

@ErikGro

@ErikGro ErikGro commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

#190

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@ErikGro
Update zenodo.py
3a46dc4
#190
@ErikGro ErikGro linked an issue Sep 7, 2026 that may be closed by this pull request
[BUG] HTTP error responses from Zenodo bypass the "use local copy" fallback #190
Open
@brainless-bot

brainless-bot Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

🤖 Code Formatting Reminder

Hello there! 👋 It looks like the code in this pull request might benefit from some formatting improvements.
Fix the issues locally or use our auto format action by commenting /format on this PR!

Code style: black

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@neuronflow neuronflow mentioned this pull request Oct 11, 2026
fix: download Zenodo record files via the files API #194
Merged
@neuronflow
neuronflow requested a balanced review from Copilot November 2, 2026 14:02
Copilot started reviewing on behalf of neuronflow November 2, 2026 14:02
View session
Copilot AI reviewed Nov 2, 2026
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The 404 contract change breaks an existing test, while staging-directory errors bypass local fallback and owner-only published permissions prevent shared access to assets.

3 open issues
  • High severity Update 404 tests for the new fallback behavior · New
  • Medium severity Staging directory errors bypass the local-copy fallback · New
  • Medium severity Published assets retain staging's owner-only permissions · New
What changed in this PR

This PR addresses #190 by improving Zenodo failure handling for atlas and SynthStrip weight downloads, allowing existing local assets to remain usable during service failures.

Changes:

  • Adds HTTP request timeouts and routes metadata errors to the local-copy fallback.
  • Skips empty or unparseable local version directories.
  • Stages downloads in temporary directories and retains the old version if an upgrade fails.
File Description
brainles_preprocessing/​utils/​zenodo.py Improves Zenodo error handling, local version selection, and staged asset replacement.

Review effort: Balanced

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread brainles_preprocessing/utils/zenodo.py
f"Zenodo returned an unexpected status for record "
f"'{self.record_id}' ({response.status_code=})."
)
return None
Comment thread brainles_preprocessing/utils/zenodo.py
Comment on lines +255 to +260
self.target_dir.mkdir(parents=True, exist_ok=True)
# Staged inside target_dir so the final move is a rename on the same
# filesystem. The leading dot keeps it out of _glob_pattern().
staging_dir = Path(
tempfile.mkdtemp(prefix=f".tmp_{self.record_id}_", dir=self.target_dir)
)
Comment thread brainles_preprocessing/utils/zenodo.py
f"Failed to delete {path}: {excinfo}"
),
)
staging_dir.replace(folder)
@neuronflow neuronflow assigned ErikGro Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Copilot left review comments

At least 1 approving review is required to merge this pull request.

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@ErikGro ErikGro

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

[BUG] HTTP error responses from Zenodo bypass the "use local copy" fallback

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@ErikGro
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.