Lectures that call the World Bank API fail their build when the API is slow or down
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 3/5
- 預估耗時
- 半天
- 新手友好度
- 35/100
研究方向
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.
由索引模型根據 Issue 內容生成。
描述
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.
- 主要語言
- Jupyter Notebook
- 星號
- 71
- 分支
- 37
- 平均合併
- 13 小時 9 分鐘
- 30 天內合併 PR
- 8
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
QuantEcon/lecture-python-intro 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 86/100
QuantEcon/lecture-python-intro#884 ·
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 80/100
QuantEcon/lecture-python-intro#871 ·
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 88/100
QuantEcon/lecture-python-intro#864 ·
維護者通常 1 天內回覆
-
lake_model_intro, time_series_with_matrices, long_run_growth: four small fixes可能已有人在做 @nishantmishraa 於 29 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 78/100
QuantEcon/lecture-python-intro#862 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
QuantEcon/lecture-python-intro#851 ·
維護者通常 1 天內回覆
查看 QuantEcon/lecture-python-intro 的全部 Issue
相似的 Issue
-
memmapped_arange ignores the start value and drops the last point above the memmap threshold可能已有人在做 @prathameshfuke 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 78/100
StingraySoftware/HENDRICS#213 ·
-
country:US rating:6 request-theme type:TV SHOW
難度 1/5 1 小時以內 新手友好度 65/100
LizardByte/ThemerrDB#10501 · 1 則留言 ·
-
triage/confirmed
難度 2/5 1-3 小時 新手友好度 77/100
agentscope-ai/agentscope#4563 ·
維護者通常 2 天內回覆
-
review
難度 2/5 1-3 小時 新手友好度 63/100
維護者通常 1 天內回覆
-
Split part lines show the bare category name, ordinary booking lines show the full category path未關閉bugfix
難度 2/5 1-3 小時 新手友好度 73/100
GiroCrab/GiroCrab#2528 · 1 則留言 ·
維護者通常 1 天內回覆