Surfaced during a QuantEcon/actions container-validation run (test-containers-lectures.yml building this repo).
What happened
lectures/hansen_singleton_1983.md failed to execute:
nbclient.exceptions.CellExecutionError: ...
HTTPError: HTTP Error 429: Too Many Requests
The failing (hidden) cell fetches the dataset over the network:
DATA_URL = (
"https://github.com/QuantEcon/lecture-python.myst/raw/refs/heads/main/"
"lectures/_static/lecture_specific/hansen_singleton_1983/"
"hansen_singleton_1983_data.csv"
)
_data = pd.read_csv(DATA_URL, index_col=0, parse_dates=True)
Root cause
That CSV is already vendored in this repo at lectures/_static/lecture_specific/hansen_singleton_1983/hansen_singleton_1983_data.csv, yet the notebook reads it back over HTTP from github.com/.../raw/.... Under CI load (the container-test matrix builds several repos from GitHub's shared runner IP ranges) raw-GitHub rate-limits the request with HTTP 429 and the build fails. It's non-deterministic — the same notebook passed on the other container in the same run (network luck).
Suggested fix
Read the local checked-out copy instead of the remote URL — the file is already on disk during the build, which removes the network dependency and the flake entirely:
_data = pd.read_csv(
"_static/lecture_specific/hansen_singleton_1983/hansen_singleton_1983_data.csv",
index_col=0, parse_dates=True,
)
(Confirm the relative path against the notebook's execution CWD / whatever local-data convention the repo already uses.)
Note
lectures/hansen_singleton_1982.md has a parallel _static/lecture_specific/hansen_singleton_1982/ dataset and very likely uses the same raw-GitHub fetch — worth fixing both together.
Context: observed during the Anaconda 2026.06 container migration in QuantEcon/actions; this is not a migration/pandas-3.0 issue — purely the remote fetch.
Surfaced during a
QuantEcon/actionscontainer-validation run (test-containers-lectures.ymlbuilding this repo).What happened
lectures/hansen_singleton_1983.mdfailed to execute:The failing (hidden) cell fetches the dataset over the network:
Root cause
That CSV is already vendored in this repo at
lectures/_static/lecture_specific/hansen_singleton_1983/hansen_singleton_1983_data.csv, yet the notebook reads it back over HTTP fromgithub.com/.../raw/.... Under CI load (the container-test matrix builds several repos from GitHub's shared runner IP ranges) raw-GitHub rate-limits the request with HTTP 429 and the build fails. It's non-deterministic — the same notebook passed on the other container in the same run (network luck).Suggested fix
Read the local checked-out copy instead of the remote URL — the file is already on disk during the build, which removes the network dependency and the flake entirely:
(Confirm the relative path against the notebook's execution CWD / whatever local-data convention the repo already uses.)
Note
lectures/hansen_singleton_1982.mdhas a parallel_static/lecture_specific/hansen_singleton_1982/dataset and very likely uses the same raw-GitHub fetch — worth fixing both together.Context: observed during the Anaconda 2026.06 container migration in
QuantEcon/actions; this is not a migration/pandas-3.0 issue — purely the remote fetch.