Skip to content

[knowing_forecasts_of_others] FIX: comment out pyo.init_notebook_mode to fix PDF build#309

Merged
mmcky merged 1 commit intomainfrom
fix/pdf-build-plotly-html-308
Feb 6, 2026
Merged

[knowing_forecasts_of_others] FIX: comment out pyo.init_notebook_mode to fix PDF build#309
mmcky merged 1 commit intomainfrom
fix/pdf-build-plotly-html-308

Conversation

@mmcky
Copy link
Contributor

@mmcky mmcky commented Feb 6, 2026

Summary

pyo.init_notebook_mode(connected=True) in knowing_forecasts_of_others.md outputs only text/html (it injects the plotly.js library into the notebook). The LaTeX/PDF builder has no way to render HTML output, so with -W (warnings-as-errors) this single warning kills the PDF build.

Fix

Commented out the pyo.init_notebook_mode(connected=True) call and added a note that it should be uncommented when running interactively in a notebook. This call is not needed for the book build since all plotly figures in this lecture already use Image(fig.to_image(format="png", engine="kaleido")) for static PNG export.

Closes #308

pyo.init_notebook_mode(connected=True) outputs only text/html which the
LaTeX builder cannot render. With -W (warnings-as-errors) this kills the
PDF build. The lecture uses kaleido for static PNG export so this call is
not needed for the book build.

Closes #308
@netlify
Copy link

netlify bot commented Feb 6, 2026

Deploy Preview for lustrous-melomakarona-3ee73e ready!

Name Link
🔨 Latest commit 2f29797
🔍 Latest deploy log https://app.netlify.com/projects/lustrous-melomakarona-3ee73e/deploys/698557539a1062000836d200
😎 Deploy Preview https://deploy-preview-309--lustrous-melomakarona-3ee73e.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions
Copy link

github-actions bot commented Feb 6, 2026

@mmcky mmcky merged commit 2b107cd into main Feb 6, 2026
9 checks passed
@mmcky mmcky deleted the fix/pdf-build-plotly-html-308 branch February 6, 2026 03:20
@mmcky mmcky changed the title FIX: comment out pyo.init_notebook_mode to fix PDF build [knowing_forecasts_of_others] FIX: comment out pyo.init_notebook_mode to fix PDF build Feb 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[pdf] FIX: issue with warning being edited in pdf builds

1 participant