quarto-dev / quarto-cli

Open-source scientific and technical publishing system built on Pandoc.
https://quarto.org
Other
3.95k stars 326 forks source link

Intermittent hang on building with Jupyter / qmd. #7291

Closed matthew-brett closed 1 year ago

matthew-brett commented 1 year ago

Bug description

This one has been very unpleasant and time-consuming to (partly) pin down.

I first noticed that there's an invariable hang when building our current textbook, that we have just ported over to Quarto. You can reproduce with:

git clone https://github.com/matthew-brett/dsip-quarto
cd dsip-quarto
make

For me, this always hangs 40 cells into the lin_regression_multiple_predictors notebook.

I have been working for about 6 hours to strip this down to a minimal reproducible example, but it appears to be intermittent as the example gets smaller and simpler. For my minimal reproducer, you will likely have to run the build multiple times (see the reproducer below).

Notably, once you have a directory where it has stalled, rerunning quarto render does not restart a kernel for that notebook on which it hangs; the build just stalls before this point.

Steps to reproduce

# Get the source repo
git clone https://github.com/matthew-brett/d70
# Install requirements
(cd d70 && pip install -r requirements.txt)
# Clone multiple times, and rebuild to induce intermittent hang
for i in $(seq 1 40); do (out=tmp_repo_$i && git clone d70 $out && cd $out && make); done

Expected behavior

The command above will clone the source repo multiple times and do a rebuild with quarto render --to html. This should be possible without hang or error, but it does (for me) hang after an average of about 6 iterations.

Actual behavior

One of the builds hangs after about 6 iterations of the loop above.

Your environment

Mac Sonoma 14.0

Output of pip list

Details ~~~ Package Version ------------------------- --------- anyio 4.0.0 appnope 0.1.3 argon2-cffi 23.1.0 argon2-cffi-bindings 21.2.0 arrow 1.3.0 asttokens 2.4.0 async-lru 2.0.4 attrs 23.1.0 Babel 2.13.0 backcall 0.2.0 beautifulsoup4 4.12.2 bleach 6.1.0 certifi 2023.7.22 cffi 1.16.0 charset-normalizer 3.3.0 comm 0.1.4 debugpy 1.8.0 decorator 5.1.1 defusedxml 0.7.1 exceptiongroup 1.1.3 executing 2.0.0 fastjsonschema 2.18.1 fqdn 1.5.1 idna 3.4 importlib-metadata 6.8.0 ipykernel 6.25.2 ipython 8.16.1 ipywidgets 8.1.1 isoduration 20.11.0 jedi 0.19.1 Jinja2 3.1.2 json5 0.9.14 jsonpointer 2.4 jsonschema 4.19.1 jsonschema-specifications 2023.7.1 jupyter_client 8.4.0 jupyter_core 5.4.0 jupyter-events 0.8.0 jupyter-lsp 2.2.0 jupyter_server 2.8.0 jupyter_server_terminals 0.4.4 jupyterlab 4.0.7 jupyterlab-pygments 0.2.2 jupyterlab_server 2.25.0 jupyterlab-widgets 3.0.9 MarkupSafe 2.1.3 matplotlib-inline 0.1.6 mistune 3.0.2 nbclient 0.8.0 nbconvert 7.9.2 nbformat 5.9.2 nest-asyncio 1.5.8 notebook_shim 0.2.3 overrides 7.4.0 packaging 23.2 pandocfilters 1.5.0 parso 0.8.3 pexpect 4.8.0 pickleshare 0.7.5 pip 23.2.1 platformdirs 3.11.0 prometheus-client 0.17.1 prompt-toolkit 3.0.39 psutil 5.9.6 ptyprocess 0.7.0 pure-eval 0.2.2 pycparser 2.21 Pygments 2.16.1 python-dateutil 2.8.2 python-json-logger 2.0.7 PyYAML 6.0.1 pyzmq 25.1.1 referencing 0.30.2 requests 2.31.0 rfc3339-validator 0.1.4 rfc3986-validator 0.1.1 rpds-py 0.10.6 Send2Trash 1.8.2 setuptools 68.2.2 six 1.16.0 sniffio 1.3.0 soupsieve 2.5 stack-data 0.6.3 terminado 0.17.1 tinycss2 1.2.1 tomli 2.0.1 tornado 6.3.3 traitlets 5.11.2 types-python-dateutil 2.8.19.14 typing_extensions 4.8.0 uri-template 1.3.0 urllib3 2.0.7 wcwidth 0.2.8 webcolors 1.13 webencodings 0.5.1 websocket-client 1.6.4 wheel 0.41.2 widgetsnbextension 4.0.9 zipp 3.17.0 ~~~

Quarto check output

Details

```bash $ quarto check Quarto 99.9.9 [✓] Checking versions of quarto binary dependencies... Pandoc version 3.1.8: OK Dart Sass version 1.55.0: OK Deno version 1.33.4: OK [✓] Checking versions of quarto dependencies......OK [✓] Checking Quarto installation......OK Version: 99.9.9 Path: /Volumes/zorg/mb312/dev_trees/quarto-cli/package/dist/bin (|) Checking tools.................... (/) Checking tools.................... (-) Checking tools.................... (\) Checking tools.................... (|) Checking tools....................Check file:///Volumes/zorg/mb312/dev_trees/quarto-cli/src/resources/vendor/deno-land/x/puppeteer@9-0-2/mod.ts (/) Checking tools.................... [✓] Checking tools....................OK TinyTeX: (not installed) Chromium: (not installed) (|) Checking LaTeX.................... (/) Checking LaTeX.................... (-) Checking LaTeX.................... (\) Checking LaTeX.................... (|) Checking LaTeX.................... (/) Checking LaTeX.................... (-) Checking LaTeX.................... (\) Checking LaTeX.................... (|) Checking LaTeX.................... (/) Checking LaTeX.................... (-) Checking LaTeX.................... (\) Checking LaTeX.................... [✓] Checking LaTeX....................OK Using: Installation From Path Path: /Library/TeX/texbin Version: 2021 (|) Checking basic markdown render.... (/) Checking basic markdown render.... (-) Checking basic markdown render.... (\) Checking basic markdown render.... (|) Checking basic markdown render.... (/) Checking basic markdown render.... (-) Checking basic markdown render.... (\) Checking basic markdown render.... (|) Checking basic markdown render.... (/) Checking basic markdown render.... [✓] Checking basic markdown render....OK (|) Checking Python 3 installation.... (/) Checking Python 3 installation.... (-) Checking Python 3 installation.... (\) Checking Python 3 installation.... (|) Checking Python 3 installation.... (/) Checking Python 3 installation.... [✓] Checking Python 3 installation....OK Version: 3.9.17 Path: /Volumes/zorg/mb312/.virtualenvs/test/bin/python3 Jupyter: 5.4.0 Kernels: python3, ir, data8 (|) Checking Jupyter engine render.... (/) Checking Jupyter engine render.... (-) Checking Jupyter engine render.... (\) Checking Jupyter engine render.... (|) Checking Jupyter engine render.... (/) Checking Jupyter engine render.... (-) Checking Jupyter engine render.... (\) Checking Jupyter engine render.... (|) Checking Jupyter engine render.... (/) Checking Jupyter engine render.... (-) Checking Jupyter engine render.... (\) Checking Jupyter engine render.... (|) Checking Jupyter engine render.... (/) Checking Jupyter engine render.... (-) Checking Jupyter engine render.... (\) Checking Jupyter engine render.... (|) Checking Jupyter engine render.... (/) Checking Jupyter engine render.... (-) Checking Jupyter engine render.... (\) Checking Jupyter engine render.... (|) Checking Jupyter engine render.... (/) Checking Jupyter engine render.... (-) Checking Jupyter engine render.... (\) Checking Jupyter engine render.... (|) Checking Jupyter engine render.... (/) Checking Jupyter engine render.... (-) Checking Jupyter engine render.... (\) Checking Jupyter engine render.... (|) Checking Jupyter engine render.... (/) Checking Jupyter engine render.... (-) Checking Jupyter engine render.... [✓] Checking Jupyter engine render....OK (|) Checking R installation........... (/) Checking R installation........... (-) Checking R installation........... (\) Checking R installation........... (|) Checking R installation........... (/) Checking R installation........... [✓] Checking R installation...........OK Version: 4.3.1 Path: /usr/local/Cellar/r/4.3.1/lib/R LibPaths: - /Users/mb312/Library/R/x86_64/4.3/library - /usr/local/lib/R/4.3/site-library - /usr/local/Cellar/r/4.3.1/lib/R/library knitr: 1.43 rmarkdown: 2.24 (|) Checking Knitr engine render...... (/) Checking Knitr engine render...... (-) Checking Knitr engine render...... (\) Checking Knitr engine render...... (|) Checking Knitr engine render...... (/) Checking Knitr engine render...... (-) Checking Knitr engine render...... (\) Checking Knitr engine render...... (|) Checking Knitr engine render...... (/) Checking Knitr engine render...... (-) Checking Knitr engine render...... (\) Checking Knitr engine render...... (|) Checking Knitr engine render...... (/) Checking Knitr engine render...... [✓] Checking Knitr engine render......OK ```

Quarto-CLI commit 6186fb8f6

mcanouil commented 1 year ago

@matthew-brett Could you edit your post possibly using the GitHub command /details (type that and menu will prompt you and draft the markdown/html) to enclose the Quarto check output (which is not great in your case likely because of where you are running the command) and your pip list?

matthew-brett commented 1 year ago

@mcanouil - I tried /details, but that didn't seem to do anything but propose types for the Markdown blocks. I've used raw blocks here, as I usually do. Is there some other formatting you'd prefer for the Markdown output blocks?

mcanouil commented 1 year ago

the command should write the following, which you can use:

<details><summary>Details</summary>
<p>

</p>
</details> 

Use it as:

<details><summary>Details</summary>

```bash
Quarto 1.4.429
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.1.8: OK
      Dart Sass version 1.55.0: OK
      Deno version 1.33.4: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.4.429
      Path: /opt/quarto/bin
...


To produce:

<details><summary>Details</summary>

```bash
Quarto 1.4.429
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.1.8: OK
      Dart Sass version 1.55.0: OK
      Deno version 1.33.4: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.4.429
      Path: /opt/quarto/bin
...

matthew-brett commented 1 year ago

Ah - sorry - you just wanted to be able to hide and unhide the outputs ... done.

mcanouil commented 1 year ago

Indeed, to avoid huge scrolling and better focus on what you are saying. You need empty lines before after code blocks also.

cscheid commented 1 year ago

Thanks for the report and repro effort.

Unfortunately, I ran your script and did the whole rendering 40 times, and could not trigger the hang.

I remain suspicious of nbclient. In the past, I've used a script like this to diagnose a problem with nbclient. You'll need nbclient and nbformat.

#!/usr/bin/env python3

import nbformat
import sys
from nbclient import NotebookClient
import atexit

notebook_filename = sys.argv[1]
nb = nbformat.read(notebook_filename, as_version=4)
client = NotebookClient(nb, timeout=600, kernel_name='julia-1.8') # NB you'll need a different kernel here!
client.create_kernel_manager()
client.start_new_kernel()
client.start_new_kernel_client()
atexit.register(client._cleanup_kernel)

for index, cell in enumerate(client.nb.cells):
  if cell.cell_type == 'code':
    cell = client.execute_cell(
        cell = cell,
        cell_index = index)
    client.nb.cells[index] = cell
nbformat.write(client.nb, sys.argv[2])

Could you try running this script on the offending notebook to see if you can trigger the error? This script effectively does the same thing as our jupyter codepath.

matthew-brett commented 1 year ago

I will run that script when I get back to my computer. Did you also try the textbook build? That always fails for me.

On Thu, 19 Oct 2023 at 15:47, Carlos Scheidegger @.***> wrote:

Thanks for the report and repro effort.

Unfortunately, I ran your script and did the whole rendering 40 times, and could not trigger the hang.

I remain suspicious of nbclient. In the past, I've used a script like this to diagnose a problem with nbclient. You'll need nbclient and nbformat.

!/usr/bin/env python3

import nbformat import sys from nbclient import NotebookClient import atexit

notebook_filename = sys.argv[1] nb = nbformat.read(notebook_filename, as_version=4) client = NotebookClient(nb, timeout=600, kernel_name='julia-1.8') # NB you'll need a different kernel here! client.create_kernel_manager() client.start_new_kernel() client.start_new_kernel_client() atexit.register(client._cleanup_kernel)

for index, cell in enumerate(client.nb.cells): if cell.cell_type == 'code': cell = client.execute_cell( cell = cell, cell_index = index) client.nb.cells[index] = cell nbformat.write(client.nb, sys.argv[2])

Could you try running this script on the offending notebook to see if you can trigger the error? This script effectively does the same thing as our jupyter codepath.

— Reply to this email directly, view it on GitHub https://github.com/quarto-dev/quarto-cli/issues/7291#issuecomment-1771144607, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAQQHE4PUFHGLGD2BJVCE3YAE4PJAVCNFSM6AAAAAA6HFSWQGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZRGE2DINRQG4 . You are receiving this because you were mentioned.Message ID: @.***>

cscheid commented 1 year ago

Did you also try the textbook build? That always fails for me.

I can't seem to satisfy the requirements:

----> 6 from jupyprint import jupyprint, arraytex
      7 # only show 6 decimals when printing
      8 np.set_printoptions(precision=6)

ModuleNotFoundError: No module named 'jupyprint'
$ pip install -r requirements.txt
...
Requirement already satisfied: pycparser in ./venv/lib/python3.10/site-packages (from cffi>=1.0.1->argon2-cffi-bindings->argon2-cffi->jupyter-server<3,>=1.16.0->jupyterlab->-r requirements.txt (line 17)) (2.21)
Requirement already satisfied: arrow>=0.15.0 in ./venv/lib/python3.10/site-packages (from isoduration->jsonschema>=3.0.1->jupyterlab-server~=2.10->jupyterlab->-r requirements.txt (line 17)) (1.3.0)
Requirement already satisfied: types-python-dateutil>=2.8.10 in ./venv/lib/python3.10/site-packages (from arrow>=0.15.0->isoduration->jsonschema>=3.0.1->jupyterlab-server~=2.10->jupyterlab->-r requirements.txt (line 17)) (2.8.19.14)
$ pip install jupyprint
ERROR: Could not find a version that satisfies the requirement jupyprint (from versions: none)
ERROR: No matching distribution found for jupyprint
matthew-brett commented 1 year ago

Ah yes, sorry, you’ll need to install that one from git+ https://github.com/pxr687/jupyprint

On Thu, 19 Oct 2023 at 16:30, Carlos Scheidegger @.***> wrote:

Did you also try the textbook build? That always fails for me.

I can't seem to satisfy the requirements:

----> 6 from jupyprint import jupyprint, arraytex 7 # only show 6 decimals when printing 8 np.set_printoptions(precision=6)

ModuleNotFoundError: No module named 'jupyprint' $ pip install -r requirements.txt ... Requirement already satisfied: pycparser in ./venv/lib/python3.10/site-packages (from cffi>=1.0.1->argon2-cffi-bindings->argon2-cffi->jupyter-server<3,>=1.16.0->jupyterlab->-r requirements.txt (line 17)) (2.21) Requirement already satisfied: arrow>=0.15.0 in ./venv/lib/python3.10/site-packages (from isoduration->jsonschema>=3.0.1->jupyterlab-server~=2.10->jupyterlab->-r requirements.txt (line 17)) (1.3.0) Requirement already satisfied: types-python-dateutil>=2.8.10 in ./venv/lib/python3.10/site-packages (from arrow>=0.15.0->isoduration->jsonschema>=3.0.1->jupyterlab-server~=2.10->jupyterlab->-r requirements.txt (line 17)) (2.8.19.14) $ pip install jupyprint ERROR: Could not find a version that satisfies the requirement jupyprint (from versions: none) ERROR: No matching distribution found for jupyprint

— Reply to this email directly, view it on GitHub https://github.com/quarto-dev/quarto-cli/issues/7291#issuecomment-1771225207, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAQQHCUFE2QMJVV2I5R7MDYAFBQDAVCNFSM6AAAAAA6HFSWQGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZRGIZDKMRQG4 . You are receiving this because you were mentioned.Message ID: @.***>

cscheid commented 1 year ago

Ok, the "good" news is that it seems that I can see the same hang as you do.

The bad news is that I don't have any good theory for what's going on. The script I posted above appears to succeed by itself, but sometimes it prints a suspicious message:

$ python ../test_nbclient.py ../lin_regression_multiple_predictors.ipynb out.ipynb
[IPKernelApp] ERROR | KeyboardInterrupt caught in kernel.

The thing is: I didn't actually interrupt the kernel. I have no idea what could be causing this...

cscheid commented 1 year ago

Your 40th cell in that notebook has an interact call:

def interactive_notation(edu_slope_guess=1,
                         inc_slope_guess=1,
                         intercept_guess=1):

    # calculate the fitted values, for this combination of parameter estimates
    fitted = edu_slope_guess * education + inc_slope_guess * income + intercept_guess

    # calculate the errors, for this combination of parameter estimates
    errors = prestige - fitted

    # do not worry about this code, it just prints the mathematical notation below this cell
    jupyprint("$\\vec{\\hat{y}} = b_1 * $ `education` + $b_2 * $ `income` +   $\\text{c} $")
    jupyprint(f"${arraytex(np.atleast_2d(fitted + errors).astype(int).T)} = {round(edu_slope_guess, 2)} * {arraytex(np.atleast_2d(education).T)} + {round(inc_slope_guess, 2)} * {arraytex(np.atleast_2d(income).T)} + {round(intercept_guess, 2)} + {arraytex(np.atleast_2d(errors).round(2).T)}$")
    jupyprint(f"The sum of the squared errors for this combination of parameter estimates is <b> {round(np.sum(errors**2), 2)} </b>")

interact(interactive_notation, edu_slope_guess = (-1, 1, 0.1), inc_slope_guess = (-1, 1, 0.1), intercept_guess = (-10, 10, 0.1))

I won't pretend to have a good explanation for why this only hangs in some settings, but interact is not a thing you should run in non-server settings.

matthew-brett commented 1 year ago

For interact - yes - but - don't you think there will be a large number of textbook pages that people will want to render non-interactively, but will also want to allow the user to interact with them on a server? Would they then have to write some sort of conditional filtering logic to drop the interact cells for the rendered page?

For the script - I get an interesting effect running it with the test3.ipynb page generated from the test3.qmd notebook in the example repo d70 above. If I run:

python run_notebook.py test3.ipynb out.ipynb

five times, interactively or via script, it returns in less than a second for the first four calls, but hangs for a long time (longer than I had time to wait for) with the fifth call.

cscheid commented 1 year ago

For interact - yes - but - don't you think there will be a large number of textbook pages that people will want to render non-interactively, but will also want to allow the user to interact with them on a server? Would they then have to write some sort of conditional filtering logic to drop the interact cells for the rendered page?

I unfortunately think that's the only solution for the time being. The rendering of a book and an interactive notebook are truly different things; there's no way for quarto to detect in general situations where the code is working in an "interactive" manner. Where should we stop? Open sockets? syscalls that open a fifo queue? input() calls?

I would love for quarto to be so popular that we could convince authors of libraries like interact to detect, somehow, that it's operating in a non-interactive setting. But someone, somewhere, needs to be able to draw that distinction, and quarto is quite limited in its ability, even in principle, to detect such settings.

For the script - I get an interesting effect running it with the test3.ipynb page generated from the test3.qmd notebook in the example repo d70 above. If I run:

python run_notebook.py test3.ipynb out.ipynb

five times, interactively or via script, it returns in less than a second for the first four calls, but hangs for a long time (longer than I had time to wait for) with the fifth call.

This is a convincing argument for there existing a problem in nbclient, or some of its dependencies, and probably needs a minimal case and bug report over at https://github.com/jupyter/nbclient

matthew-brett commented 1 year ago

It's a usability issue I guess - JupyterBook will build those pages, although they do hang for a while on build. I believe the intention is that interact pages should be buildable to HTML - from these docs : https://ipywidgets.readthedocs.io/en/latest/embedding.html . We started with Jupyter Book, but were hoping to switch to Quarto. I think the answer for that is - not yet - or at least - not unless we build the infrastructure to automate a non-interactive and interactive version.

matthew-brett commented 1 year ago

Any reason not to close this issue? Happy to do that.

cscheid commented 1 year ago

It's a usability issue I guess - JupyterBook will build those pages, although they do hang for a while on build

Hm. Do you happen to know how JupyterBook knows to treat interact differently?

matthew-brett commented 1 year ago

I don't know how Jupyter Book handles interact I'm afraid. It seemed to me when I looked before that there was some expectation that ipywidgets should work with Quarto - particularly from discussion at https://github.com/quarto-dev/quarto-cli/issues/2445 - but perhaps that's not the case.

mcanouil commented 1 year ago

ipywidgets works with Quarto but not for the parts requiring server-side Python.

See for instance the slider: https://github.com/quarto-dev/quarto-cli/discussions/6496#discussioncomment-7127445

cscheid commented 1 year ago

@matthew-brett In an experiment of mine, jupyter-book does not work with interact: it just times out after a certain amount of time. Take the template book from jupyter-book, add the following cell

```{code-cell}
from ipywidgets import interact
import pandas as pd
import numpy as np
from jupyprint import jupyprint, arraytex

df = pd.read_csv("data/Duncan_Occupational_Prestige.csv")
df = df.head(15)
education = np.array(df['education'])
income = np.array(df['income'])
prestige = np.array(df['prestige'])

print(2 + 2)

def interactive_notation(edu_slope_guess=1,
                         inc_slope_guess=1,
                         intercept_guess=1):

    # calculate the fitted values, for this combination of parameter estimates
    fitted = edu_slope_guess * education + inc_slope_guess * income + intercept_guess

    # calculate the errors, for this combination of parameter estimates
    errors = prestige - fitted

    # do not worry about this code, it just prints the mathematical notation below this cell
    jupyprint("$\\vec{\\hat{y}} = b_1 * $ `education` + $b_2 * $ `income` +   $\\text{c} $")
    jupyprint(f"${arraytex(np.atleast_2d(fitted + errors).astype(int).T)} = {round(edu_slope_guess, 2)} * {arraytex(np.atleast_2d(education).T)} + {round(inc_slope_guess, 2)} * {arraytex(np.atleast_2d(income).T)} + {round(intercept_guess, 2)} + {arraytex(np.atleast_2d(errors).round(2).T)}$")
    jupyprint(f"The sum of the squared errors for this combination of parameter estimates is <b> {round(np.sum(errors**2), 2)} </b>")

interact(interactive_notation, edu_slope_guess = (-1, 1, 0.1), inc_slope_guess = (-1, 1, 0.1), intercept_guess = (-10, 10, 0.1))

Then copy the data file to the right place and run `jupyter-book build mynewbook`. You'll see jupyter-book alternate between hanging, and printing the following error message:

jupyter-book build mynewbook Running Jupyter-Book v0.15.1 Source Folder: /Users/cscheid/Desktop/daily-log/2023/10/19/mynewbook Config Path: /Users/cscheid/Desktop/daily-log/2023/10/19/mynewbook/_config.yml Output Path: /Users/cscheid/Desktop/daily-log/2023/10/19/mynewbook/_build/html [sphinxcontrib-bibtex] Beware that docutils versions 0.18 and 0.19 (you are running 0.18.1) are known to generate invalid html for citations. If this issue affects you, please use docutils<0.18 (or >=0.20 once released) instead. For more details, see https://sourceforge.net/p/docutils/patches/195/ Running Sphinx v5.0.2 making output directory... done [etoc] Changing master_doc to 'intro' checking bibtex cache... out of date parsing bibtex file /Users/cscheid/Desktop/daily-log/2023/10/19/mynewbook/references.bib... parsed 5 entries myst v0.18.1: MdParserConfig(commonmark_only=False, gfm_only=False, enable_extensions=['colon_fence', 'dollarmath', 'linkify', 'substitution', 'tasklist'], disable_syntax=[], all_links_external=False, url_schemes=['mailto', 'http', 'https'], ref_domains=None, highlight_code_blocks=True, number_code_blocks=[], title_to_header=False, heading_anchors=None, heading_slug_func=None, footnote_transition=True, words_per_minute=200, sub_delimiters=('{', '}'), linkify_fuzzy_links=True, dmath_allow_labels=True, dmath_allow_space=True, dmath_allow_digits=True, dmath_double_inline=False, update_mathjax=True, mathjax_classes='tex2jax_process|mathjax_process|math|output_area') myst-nb v0.17.2: NbParserConfig(custom_formats={}, metadata_key='mystnb', cell_metadata_key='mystnb', kernel_rgx_aliases={}, execution_mode='force', execution_cache_path='', execution_excludepatterns=[], execution_timeout=30, execution_in_temp=False, execution_allow_errors=False, execution_raise_on_error=False, execution_show_tb=False, merge_streams=False, render_plugin='default', remove_code_source=False, remove_code_outputs=False, code_prompt_show='Show code cell {type}', code_prompt_hide='Hide code cell {type}', number_source_lines=False, output_stderr='show', render_text_lexer='myst-ansi', render_error_lexer='ipythontb', render_image_options={}, render_figure_options={}, render_markdown_format='commonmark', output_folder='build', append_css=True, metadata_to_fm=False) Using jupyter-cache at: /Users/cscheid/Desktop/daily-log/2023/10/19/mynewbook/_build/.jupyter_cache building [mo]: targets for 0 po files that are out of date building [html]: targets for 4 source files that are out of date updating environment: [new config] 4 added, 0 changed, 0 removed /Users/cscheid/Desktop/daily-log/2023/10/19/mynewbook/markdown-notebooks.md: Executing notebook using local CWD [mystnb] [IPKernelApp] ERROR | KeyboardInterrupt caught in kernel. ...



This is the same behavior we're observing here, and appears to point to the fact that one shouldn't use `interact` in jupyter-book either.

I understand it's an honest error, but this kind of stuff makes us spend a lot of time on wild-goose chases. If you don't mind trying to be more precise in the future, it would allow us more time to fix actual bugs on our side. Thank you.
matthew-brett commented 1 year ago

Er - sorry - I guess the criticism is of my statement that jupyter-book does not hang for this page. I'm sorry for that. And yes - I can surely make sure I don't take any more of your time. In fact, I did rather regret spending such a long time trying to prune this example down, so we are all learning here!