Skip to content

Fix Beetl2021 403 Forbidden from Figshare API#969

Merged
bruAristimunha merged 3 commits intodevelopfrom
fix-beetl
Feb 11, 2026
Merged

Fix Beetl2021 403 Forbidden from Figshare API#969
bruAristimunha merged 3 commits intodevelopfrom
fix-beetl

Conversation

@bruAristimunha
Copy link
Collaborator

Summary

  • Add early-return in data_path() for both Beetl2021_A and Beetl2021_B to skip Figshare API calls when subject data and label files already exist locally. The Figshare articles (especially 14839650) are private/restricted, causing 403 Forbidden errors after initial download.
  • Fix double-nested directory structure from zip extraction (finalMI/finalMI/S1/...finalMI/S1/...) by extracting into base_path instead of a subdirectory named after the zip.
  • Maintain backward compatibility with existing double-nested data by checking both path structures in _get_single_subject_data().

Test plan

  • pre-commit run --all-files passes
  • python -m pytest moabb/tests/ -k beetl --timeout=120 passes
  • Manual: Beetl2021_A().data_path(1) returns without hitting the network when data exists on disk

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.
@bruAristimunha bruAristimunha merged commit 2d69402 into develop Feb 11, 2026
11 of 12 checks passed
@bruAristimunha bruAristimunha deleted the fix-beetl branch February 11, 2026 15:42
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.

1 participant