Trusting a notebook is not working in PyCharm

Viewed 930

I want to run a Jupyter notebook in PyCharm but on cells that are executing javascript, I get the message, that the notebook is not trusted.

When I click the "Trusted" checkbox, the arrow appears for a second and then disappears again. The notebook stays untrusted. Also using the command-line interface for Jupyter with

jupyter trust notebook.ipynb

doesn't work.

When I open the notebook on the browser with the same kernel running, it works just fine.

I also want to add that I have three projects open at the same time. When I just open the project, which is containing the notebook, I can click the "Trusted" checkbox and it will stay checked, but still, the javascript cells will not execute.

Maybe that's a bug, but probably I messed up some settings? Can you help me find out, which settings I can change and if there are other options to get the notebook trusted within the IDE?

Have a nice day!

2 Answers

I had the same problem when I moved the notebook's directory. What solved it for me in PyCharm was to copy and paste the notebook's content into a new file.

I came across this issue when specifying %matplotlib notebook. Changing this to %matplotlib inline got the plotting to work. Not fully understanding the issue or how this solves it but it is sufficient for my application.

Related