1

When I create a new notebook in Jupyter Lab, add a line of code, shift-enter, the code runs, produces output and a new cell appears below the first line of code. The trust shield icon then changes from a check mark to an 'x'. If I delete the blank cell, the trust icon returns to check mark.

So far so good, blank cells are untrusted, even after saving.

But if instead of deleting the blank cell, I change it to markdown and enter text and save the notebook (say as testTrust.ipynb), the trust icon remains 'x'. Hovering over the shield icon gives the text: Notebook not trusted, 1 of 2 cells trusted. In a longer notebook, every markdown cell is counted as untrusted.

Running

jupyter trust testTrust.ipynb

gives

ERROR | Notebook missing: testTrust.ipynb

This is a new install in a new virtual environment, installed through miniconda:

    conda install -c conda-forge jupyterlab nodejs ipympl

where inclusion of the nodejs package was triggered by a previous install attempt giving:

Could not determine jupyterlab build status without nodejs

at launch, and ipympl was included for use of %matplotlib widgets magic.

How can I fix the trust issues in this install?

Ubuntu 20.04, python 3.9.2, jupyterlab 3.0.9

sbr
  • 11
  • 1

1 Answers1

0

Please refer to https://ipython.org/ipython-doc/dev/notebook/security.html which explains the security in iPython noteebook. As mentioned in the article, one of the option to make html text as trusted is to explicitly mark it trusted by executing the following line in command-line

ipython trust /path/to/notebook.ipynb

Venkat
  • 115
  • 1
  • 2
  • 8
  • ipython trust gave deprecation warning but completed without error. New notebooks added in jupyter lab continue to show markdown as untrusted. jupyter trust also completes but effects no change in markdown behavior. – sbr Mar 09 '21 at 15:09