{ "cells": [ { "cell_type": "markdown", "metadata": { "nbsphinx": "hidden" }, "source": [ "This notebook is part of the `nbsphinx` documentation: https://nbsphinx.readthedocs.io/." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Cell Execution Timeout\n", "\n", "By default, `nbconvert` (which is used to execute the notebooks during the Sphinx build process) will give a cell 30 seconds to execute before it times out.\n", "\n", "If you would like to change the amount of time given for a cell, you can change the timeout length for all notebooks by setting the following option in [conf.py](conf.py):\n", "\n", "```python\n", "nbsphinx_timeout = 60\n", "```\n", "\n", "Or change the timeout length on a per-notebook basis by adding this to the notebook's JSON metadata:\n", "\n", "```\n", "\"nbsphinx\": {\n", " \"timeout\": 60\n", "},\n", "```\n", "\n", "The timeout is given in seconds, use `-1` to disable the timeout.\n", "\n", "Alternatively, you can manually execute the notebook in question and save the results, see [the pre-executed example notebook](pre-executed.ipynb)." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "
\n", "\n", "**Note:**\n", "\n", "It would make more sense to disable the timeout by default,\n", "but this problem has not yet been fixed in `nbconvert`,\n", "see https://github.com/jupyter/nbconvert/issues/791.\n", "\n", "
" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.5" }, "nbsphinx": { "timeout": 60 } }, "nbformat": 4, "nbformat_minor": 4 }