The logs in jupyter are too verbose + notebook is not trusted after black / reload
See original GitHub issueHere is an short extract of the logs of my jupyter lab:
[I 2021-05-30 22:03:35.450 ServerApp] Saving file at /Fibonacci.py
[I 2021-05-30 22:03:35.451 ServerApp] Loading Jupytext configuration file at /.jupytext.toml
[I 2021-05-30 22:03:35.455 ServerApp] Saving Fibonacci.ipynb
[I 2021-05-30 22:03:35.509 ServerApp] Saving Fibonacci.py in format py:percent
[I 2021-05-30 22:03:36.338 ServerApp] Loading Jupytext configuration file at /.jupytext.toml
[I 2021-05-30 22:03:36.364 ServerApp] Saving file at /Fibonacci.py
[I 2021-05-30 22:03:36.365 ServerApp] Loading Jupytext configuration file at /.jupytext.toml
[I 2021-05-30 22:03:36.369 ServerApp] Saving Fibonacci.ipynb
[I 2021-05-30 22:03:36.437 ServerApp] Saving Fibonacci.py in format py:percent
[I 2021-05-30 22:03:46.521 ServerApp] Loading Jupytext configuration file at /.jupytext.toml
[I 2021-05-30 22:03:51.393 ServerApp] Loading Jupytext configuration file at /.jupytext.toml
[I 2021-05-30 22:03:51.399 ServerApp] Reading OUTPUTS from Fibonacci.ipynb
[W 2021-05-30 22:03:51.401 ServerApp] Notebook Fibonacci.ipynb is not trusted
[I 2021-05-30 22:03:53.760 ServerApp] Loading Jupytext configuration file at /.jupytext.toml
[I 2021-05-30 22:03:53.768 ServerApp] Saving file at /Fibonacci.py
[I 2021-05-30 22:03:53.768 ServerApp] Loading Jupytext configuration file at /.jupytext.toml
[I 2021-05-30 22:03:53.769 ServerApp] Saving Fibonacci.ipynb
[W 2021-05-30 22:03:53.769 ServerApp] Notebook Fibonacci.ipynb is not trusted
[I 2021-05-30 22:03:53.779 ServerApp] Saving Fibonacci.py in format py:percent
[I 2021-05-30 22:04:03.838 ServerApp] Loading Jupytext configuration file at /.jupytext.toml
[I 2021-05-30 22:04:13.878 ServerApp] Loading Jupytext configuration file at /.jupytext.toml
I would prefer to have
- less mentions of “Loading Jupytext configuration file at /.jupytext.toml”
- less redundancy in logs when paired files are saved: in the below we have two lines
/Fibonacci.py
andFibonacci.py
but there is a single.py
file
[I 2021-05-30 22:03:36.364 ServerApp] Saving file at /Fibonacci.py
[I 2021-05-30 22:03:36.365 ServerApp] Loading Jupytext configuration file at /.jupytext.toml
[I 2021-05-30 22:03:36.369 ServerApp] Saving Fibonacci.ipynb
[I 2021-05-30 22:03:36.437 ServerApp] Saving Fibonacci.py in format py:percent
- And I’d prefer not to have this warning
Notebook Fibonacci.ipynb is not trusted
, that came after I ranblack
and reloaded the.py
notebook.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Jupyter notebook not trusted - python - Stack Overflow
I think jupyter lab latest release 1) this popup never comes up and 2) you cannot chose Trust under the file menu. The...
Read more >What to do when things go wrong - The Jupyter Notebook
Try disabling any browser extensions and/or any Jupyter extensions you have installed. Some internet security software can interfere with Jupyter.
Read more >How to fix Kernel Error or broken Python in Jupyter Notebook
TL;DW BELOW! If you delete or upgrade your python version, you might get a Kernel Error when trying to use Jupyter Notebooks !...
Read more >Building and Exporting Python Logs in Jupyter Notebooks
Logging in Python when running scripts from the command line is very well documented, but we need to start with the basics before...
Read more >Troubleshooting in Python - Plotly
js rendering engine installed, and the way to do that depends on the environment in which you are rendering figures: Dash, Jupyter Lab...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @weiji14 , a quick comment on the resolution for this issue… I decided to refresh the config only when a notebook is opened, saved, or when a new directory is listed - No more periodical updates, so much less logs. The difference with the previous behavior is only for listing directories, so I do not expect much impact on users (the updated config will be used anyway when they open a file).
Hmm, a 1 second cache seems too fast… I doubt configuration files change very often, maybe increase it to something like 5 minutes? I’m still thinking whether this could be logged at the debug-level instead. Or, if you prefer keeping it at the info-level, only print out the log message if the configuration file did change from last time (e.g. change the message from “Loading Jupytext config…” to “Loaded Jupytext config…”).