I have a daily process using Papermill to generate a few Jupyter Notebook files that overwrite the files from previous day. Every time the newly generated files are marked as "untrusted". I can click the button to make them trusted, but annoying to do that everyday. Is there any way to automatically set those files to be "trusted" when generating the files with Papermill? Many thanks!
Asked
Active
Viewed 1,769 times
1 Answers
2
Try:
jupyter trust mynotebook.ipynb
As reference in official docs:
https://jupyter-notebook.readthedocs.io/en/latest/notebook.html?highlight=trust#signing-notebooks

gogasca
- 9,283
- 6
- 80
- 125
-
1It worked. Thanks! To be clear to other people, I executed that line with os in the papermill batch job code: os.system('jupyter trust mynotebook.ipynb') – Leon Oct 08 '21 at 12:53