Fix Beetl2021 403 Forbidden from Figshare API#969
Merged
bruAristimunha merged 3 commits intodevelopfrom Feb 11, 2026
Merged
Conversation
Add early-return in data_path() to skip Figshare API calls when data already exists locally. The Figshare articles (especially 14839650) are private/restricted, causing 403 errors after initial download. Also fix double-nested directory structure from zip extraction (finalMI/finalMI/S1 -> finalMI/S1) by extracting into base_path instead of a subdirectory. Backward compatibility with existing double-nested data is preserved.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
data_path()for bothBeetl2021_AandBeetl2021_Bto skip Figshare API calls when subject data and label files already exist locally. The Figshare articles (especially14839650) are private/restricted, causing403 Forbiddenerrors after initial download.finalMI/finalMI/S1/...→finalMI/S1/...) by extracting intobase_pathinstead of a subdirectory named after the zip._get_single_subject_data().Test plan
pre-commit run --all-filespassespython -m pytest moabb/tests/ -k beetl --timeout=120passesBeetl2021_A().data_path(1)returns without hitting the network when data exists on disk