Lectures that call the World Bank API fail their build when the API is slow or down
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- Nửa ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
The World Bank calls sit in lectures/business_cycle.md (after the import wbgapi as wb at line 41), lectures/heavy_tails.md (line 34, with calls near line 803) and lectures/inequality.md (line 94, with calls at lines 553, 572 and 723). Start by reading those cells and the setup the issue proposes for a timeout and retry. Done means the lectures survive a slow or 502 response without failing the build, and the change is reviewed by a maintainer, since it touches lecture content and may wrap wbgapi's private _queryAPI.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Three lectures fetch data from api.worldbank.org through wbgapi while they build: lectures/business_cycle.md (import wbgapi as wb at line 41, then wb.series.info and wb.data.DataFrame for NY.GDP.MKTP.KD.ZG, SL.UEM.TOTL.NE.ZS and FS.AST.PRVT.GD.ZS), lectures/heavy_tails.md (line 34, then wb.data.DataFrame and wb.economy.info near line 803) and lectures/inequality.md (line 94, then SI.POV.GINI at lines 553 and 572 and NY.GDP.PCAP.KD at line 723).
The calls set no timeout and no retry. A 502 from the API fails the cell, and a request that hangs runs to the 600 s cell timeout, so the build fails either way. Both have happened in QuantEcon/actions' lecture matrix: on 2026-11-16 (run 43789867796, see QuantEcon/actions#333) all three lectures failed on APIError: [502] Bad Gateway from api.worldbank.org, and on 2026-11-17 (run 44030094100) the SI.POV.GINI cell in inequality.md timed out after 600 s. A run on 2026-11-12 (43135770816) also failed in business_cycle.md and timed out in inequality.md, but its tracebacks are no longer available.
A possible change: a hidden setup cell after each import wbgapi as wb that sets a request timeout (wbgapi 1.0.14 passes wb.get_options to requests.get, so wb.get_options['timeout'] = 60 works) and retries a failed request up to three times. A timeout alone would turn slow successes into failures, so the retry matters. wbgapi has no public retry option: a retry means wrapping its private _queryAPI, or a change in wbgapi itself. Any such change touches lecture content, so it needs a person's review before it merges.
lecture-python-programming's pandas.md makes the same kind of call: see QuantEcon/lecture-python-programming#668.
- Ngôn ngữ chính
- Jupyter Notebook
- Star
- 71
- Fork
- 37
- Merge trung bình
- 13 giờ 9 phút
- Pull request đã merge (30 ngày)
- 8
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
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của QuantEcon/lecture-python-intro
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
QuantEcon/lecture-python-intro#884 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
QuantEcon/lecture-python-intro#871 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
QuantEcon/lecture-python-intro#864 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
lake_model_intro, time_series_with_matrices, long_run_growth: four small fixesCó thể đã có người làm @nishantmishraa đã nhận 29 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
QuantEcon/lecture-python-intro#862 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
QuantEcon/lecture-python-intro#851 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của QuantEcon/lecture-python-intro
Issue tương tự
-
memmapped_arange ignores the start value and drops the last point above the memmap thresholdCó thể đã có người làm @prathameshfuke đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
StingraySoftware/HENDRICS#213 ·
-
[TV SHOW]: Dynasty (1981)Đang mởcountry:US rating:6 request-theme type:TV SHOW
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 65/100
LizardByte/ThemerrDB#10501 · 1 bình luận ·
-
triage/confirmed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
agentscope-ai/agentscope#4563 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
review
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 63/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Split part lines show the bare category name, ordinary booking lines show the full category pathĐang mởbugfix
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
GiroCrab/GiroCrab#2528 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày