{ "cells": [ { "cell_type": "markdown", "id": "11daeb71", "metadata": {}, "source": [ "# Troubleshooting\n", "\n", "## Loading takes forever?" ] }, { "cell_type": "code", "execution_count": 1, "id": "351bb5f0", "metadata": { "tags": [ "hide-input" ] }, "outputs": [ { "data": { "text/html": [ "\n", "\n", " \n", " \n", " \n", " \n", "\n", "\n", "\n", "\n", "
A table that does not load, due to init_notebook_mode
not being called in this document
\n", "
\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "\n", " \n", " \n", " \n", " \n", "\n", " \n", " \n", " \n", " \n", "\n", " \n", " \n", " \n", " \n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", "\n", "\n", "
\n", "
\n", "Loading ITables v2.2.2 from the init_notebook_mode cell...\n", "(need help?)
\n", "\n" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "import pandas as pd\n", "\n", "from itables import show\n", "\n", "df = pd.DataFrame()\n", "tags = (\n", " 'A table that does not load, due '\n", " \"to init_notebook_mode
not being called in this document\"\n", ")\n", "\n", "show(df, connected=False, tags=tags)" ] }, { "cell_type": "markdown", "id": "46074ab8", "metadata": {}, "source": [ "If a table says \"Loading...\" forever, then maybe\n", "- You forgot to run `init_notebook_mode` (like in the example above), or you deleted that cell or its output\n", "- Or you ran `init_notebook_mode(connected=True)` but you are not connected to the internet?\n", "\n", "```{tip}\n", "If you change the value of the `connected` argument in\n", "the `init_notebook_mode` cell, you need to re-execute all the cells\n", "that display interactive tables.\n", "```\n", "\n", "## Trust your notebook\n", "\n", "It could also be that your notebook is not _trusted_. This happens when you\n", "have not run the notebook in full yourself (e.g. the notebook was sent to you with outputs,\n", "or the notebook was created by a tool like `papermill`). In that case, JavaScript\n", "code cannot run (and the interactive tables won't display)\n", "until you tell Jupyter that you trust the notebook content\n", "(run \"Trust Notebook\" in View / Activate Command Palette).\n", "\n", "## Check ITables' version\n", "\n", "If the above does not help, please check out the [ChangeLog](changelog.md)\n", "and decide whether you should upgrade `itables`. You can tell the version\n", "of ITables that you are using by looking at the loading message (from ITables v2.0.1 on)\n", "or by running this code snippet:\n", "```python\n", "import itables as it\n", "\n", "it.__version__\n", "```" ] } ], "metadata": { "jupytext": { "formats": "md:myst", "notebook_metadata_filter": "-jupytext.text_representation.jupytext_version", "text_representation": { "extension": ".md", "format_name": "myst", "format_version": 0.13 } }, "kernelspec": { "display_name": "itables", "language": "python", "name": "itables" }, "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.11.10" }, "source_map": [ 13, 19, 33 ] }, "nbformat": 4, "nbformat_minor": 5 }