From 2f297974a704e4ddcb0ff2133fc601a4d234600d Mon Sep 17 00:00:00 2001 From: Matt McKay Date: Fri, 6 Feb 2026 13:51:42 +1100 Subject: [PATCH] FIX: comment out pyo.init_notebook_mode to fix PDF build 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 --- lectures/knowing_forecasts_of_others.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lectures/knowing_forecasts_of_others.md b/lectures/knowing_forecasts_of_others.md index ae198ed9..44879cd5 100644 --- a/lectures/knowing_forecasts_of_others.md +++ b/lectures/knowing_forecasts_of_others.md @@ -921,7 +921,8 @@ import plotly.offline as pyo from statsmodels.regression.linear_model import OLS from IPython.display import display, Latex, Image -pyo.init_notebook_mode(connected=True) +# Uncomment the following line when running in a notebook +# pyo.init_notebook_mode(connected=True) ``` ```{code-cell} python3