bwm_usage_notebook.ipynb fails on colab

Đang mở
#176 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

@bendichter đang làm issue này rồi.

Từ ngày 29/6/2026.

  • #177 của @bendichter — đang mở

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
52/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
jupyter-notebook, python
Lĩnh vực
documentation

Hướng nghiên cứu

Mở bwm_usage_notebook.ipynb trong Colab và tái hiện lỗi ở ô 18, bắt đầu với workaround cho brainglobe-atlasapi 2.3.1 và atlasapi issue 738 được liên kết. Kiểm tra lý do fallback về phiên bản đã được cache vẫn dẫn đến một tệp lưu trữ atlas có kích thước 0 byte hoặc không hợp lệ; được xem là hoàn tất khi ô chạy xong và bản tải xuống atlas được giải nén thành công sau khi xóa hoặc thử lại cache.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

cell 18 fails for a known reason

# Workaround: brainglobe-atlasapi 2.3.1 fetches its atlas-version manifest
# from a Colab-unfriendly S3 endpoint that returns 403 for some Colab IPs.
# Pre-seed the cache so BrainGlobeAtlas() below can find a version manifest
# even when the live fetch fails. See https://github.com/brainglobe/brainglobe-atlasapi/issues/738

However it seems that the fallback doesnt work either.

Full output

Could not fetch the latest atlas versions: 403
Using the last cached version from /root/.brainglobe/last_versions.conf
Could not fetch the latest atlas versions: 403
Using the last cached version from /root/.brainglobe/last_versions.conf
Could not fetch the latest atlas versions: 403
Using the last cached version from /root/.brainglobe/last_versions.conf
Could not fetch the latest atlas versions: 403
Using the last cached version from /root/.brainglobe/last_versions.conf

Downloading... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0.0% • 0/93 bytes • speed: ? • ETA: -:--:--

---------------------------------------------------------------------------

ReadError                                 Traceback (most recent call last)

[/usr/local/lib/python3.12/dist-packages/brainglobe_atlasapi/bg_atlas.py](https://localhost:8080/#) in download_extract_file(self)
    203         try:
--> 204             tar = tarfile.open(destination_path)
    205             tar.extractall(path=self.brainglobe_dir)

3 frames

ReadError: file could not be opened successfully:
- method gz: ReadError('not a gzip file')
- method bz2: ReadError('not a bzip2 file')
- method xz: ReadError('not an lzma file')
- method tar: ReadError('truncated header')


The above exception was the direct cause of the following exception:

ReadError                                 Traceback (most recent call last)

[/usr/local/lib/python3.12/dist-packages/brainglobe_atlasapi/bg_atlas.py](https://localhost:8080/#) in download_extract_file(self)
    208             # Delete corrupted file so we can try again later
    209             destination_path.unlink(missing_ok=True)
--> 210             raise tarfile.ReadError(
    211                 f"Atlas download was interrupted or corrupted. "
    212                 f"Please try again. Details: {e}"

ReadError: Atlas download was interrupted or corrupted. Please try again. Details: file could not be opened successfully:
- method gz: ReadError('not a gzip file')
- method bz2: ReadError('not a bzip2 file')
- method xz: ReadError('not an lzma file')
- method tar: ReadError('truncated header')

I tried clearing the cache, and retrying the download but this error seems to persist.

Ngôn ngữ chính
Jupyter Notebook
Star
10
Fork
20
Merge trung bình
3 giờ 37 phút
Pull request đã merge (30 ngày)
1

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của dandi/example-notebooks

Tất cả issue của dandi/example-notebooks

Issue tương tự

Thêm issue về Documentation

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.