Skip to content

Full-build failures from in-lecture pip packages (prettytable 3.18.0, arviz) — fix in-lecture #935

Closed

Description

@mmcky

Context

These lectures run on base anaconda plus a few in-lecture !pip install cells for packages anaconda doesn't ship (e.g. arviz, pymc, prettytable). Those extras are intentionally unpinned; the weekly full build (cache.yml) is what surfaces it when an upstream release of one of them breaks a lecture. The fix is in-lecture (or waiting out a transient upstream break), not pinning. This issue tracks the breakages currently surfaced by full builds so they don't get lost (the normal preview CI hides them — it restores the build-cache from main, so unchanged notebooks don't re-execute).

Surfaced while validating the anaconda 2026.06 bump (#923) with forced full builds. None of these is caused by the bump — the bump's only genuine regression (the Hansen lectures) is already fixed in #925/#926, and they now execute cleanly under anaconda 2026.06 / pandas 3.0.

1. house_auction — prettytable 3.18.0 vs base wcwidth

AttributeError: module 'wcwidth' has no attribute 'width'

Raised from present_dict(bid_info) → print(PrettyTable).

Root cause: prettytable 3.18.0 (released 2026-06-22) requires wcwidth>=0.3.5 and calls wcwidth.width() (a function added in wcwidth 0.3.x). The anaconda base ships wcwidth 0.2.13, which has no .width, and the lecture's !pip install prettytable pulls 3.18.0 without bringing wcwidth up to >=0.3.5. Result: any build today fails, on either anaconda base (2025.12 and 2026.06) — main's last good weekly build (2026-06-22 04:38) just predates the 3.18.0 upload.

Suggested in-lecture fix: ensure a current wcwidth at runtime alongside prettytable (e.g. !pip install -U prettytable wcwidth), or revisit once prettytable ships a 3.18.x fix. (prettytable has prior history of not pulling wcwidth correctly — see prettytable/prettytable#362.)

2. ar1_bayes, ar1_turningpts — az.plot_trace(figsize=...)

az.plot_trace(trace, figsize=(17,6)) (ar1_bayes lines 214/272, ar1_turningpts line 331) fails under some arviz releases. Because !pip install arviz pymc is unpinned, whether it fails is build-day-dependent: it failed on the 2026-06-22 main full build but passed in the 2026-06-26 forced builds.

Suggested in-lecture fix: when it recurs, update the trace-plot sizing to the current arviz API.

Notes

  • Filed so ⬆️ Bump anaconda from 2025.12 to 2026.06 #923 (anaconda 2025.12 → 2026.06) is not blocked on pre-existing/upstream dependency breakage. The bump itself is clean for lecture logic.
  • A main control full build (anaconda 2025.12, built 2026-06-26) is running to confirm house_auction fails identically on the current base; result to be appended.

Activity

  1. changed the title [-]ar1_bayes & ar1_turningpts fail under full execution: az.plot_trace(figsize=...) with unpinned arviz[/-] [+]Full-build failures from in-lecture pip packages (prettytable 3.18.0, arviz) — fix in-lecture[/+] on Jun 26, 2026
  2. mmcky commented on Jun 26, 2026

    @mmcky
    ContributorAuthor

    Control build confirms the bump is not the cause. A full cache.yml build of main (anaconda 2025.12, built 2026-06-26, run 28221839832) fails on only house_auction, with the identical AttributeError: module 'wcwidth' has no attribute 'width'.

    That's the same single failure as the anaconda-2026.06 forced build for #923. So the prettytable 3.18.0 breakage is present on both anaconda bases today and is independent of the version bump — #923 introduces no new failures (and fixes the Hansen lectures). The house_auction in-lecture fix here is the only thing needed to get the full build green again.

    (Note: the first attempt of that control run was a spot-runner reclamation — no execution reports — now mitigated by on-demand runners via #936.)

  3. mmcky commented on Jun 26, 2026

    @mmcky
    ContributorAuthor

    house_auction fix validated — #937. Changing the install cell to !pip install -U prettytable wcwidth makes pip pull wcwidth 0.8.1 (which exposes .width) alongside prettytable 3.18.0. #937's preview build re-executed house_auction (its source changed) and it passed green (run 28225742635, on-demand runner, no retry). Merging #937 resolves the house_auction item here; the arviz plot_trace(figsize=) items remain open.

  4. mmcky commented on Jun 26, 2026

    @mmcky
    ContributorAuthor

    Closing — the actionable work here is done.

    • house_auction (prettytable 3.18.0 / wcwidth skew): fixed in [house_auction] upgrade prettytable + wcwidth to fix wcwidth.width error #937 (merged); its preview build re-executed house_auction clean.
    • ar1_bayes / ar1_turningpts (arviz plot_trace(figsize=)): not currently reproducing — passed in both 2026-06-26 full builds (anaconda 2026.06 forced run and the 2025.12 control). It's build-day-dependent via the unpinned !pip install arviz pymc.

    If the arviz break recurs, the weekly cache.yml full build will surface it and it can be fixed in-lecture at that point. No standing action needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions