spatialaudio / nbsphinx

:ledger: Sphinx source parser for Jupyter notebooks
https://nbsphinx.readthedocs.io/
MIT License
449 stars 128 forks source link

timeout not working with %%capture #712

Open joamatab opened 1 year ago

joamatab commented 1 year ago

I think there is an error that timeout from conf.py is being ignored when using %%capture magic

https://github.com/gdsfactory/gdsfactory/issues/1330

mgeier commented 1 year ago

nbsphinx isn't implementing the timeout itself, but it instead uses nbconvert.preprocessors.ExecutePreprocessor:

https://github.com/spatialaudio/nbsphinx/blob/78088ab9c41684c4bd1f6cf069449398a97bac01/src/nbsphinx/__init__.py#L382-L385

If you can reproduce the problem directly with that (without involving nbsphinx), you could create an issue at https://github.com/jupyter/nbconvert/issues/, or maybe at https://github.com/jupyter/nbclient/issues/ (which is in turn used by nbconvert).

Once this is solved there, it will automagically also work with nbsphinx (at least I would hope so).

mgeier commented 1 year ago

This may or may not be related: https://github.com/jupyter/nbconvert/issues/1964

nthiery commented 1 year ago

Thanks @mgeier for the connection; I did some more drilling on https://github.com/jupyter/nbconvert/issues/1964. You may want to try to downgrade jupyter_client to <8.