Trusting a notebook is not working in PyCharm
Asked Answered
Z

3

7

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!

Zel answered 19/11, 2020 at 7:54 Comment(0)
H
1

Recent versions of PyCharm (starting with at least 2024.2.3) have a checkbox Trusted in the upper right corner that needs to be ticked to run JavaScript.

Trusted Checkbox in PyCharm

Tick this checkbox to execute JavaScript.

Hahnemann answered 28/9 at 12:33 Comment(1)
This is for people like me, for whom this question came up first when searching for the issue and didn't necessarily read the question. I know that the author is describing a different issue.Hahnemann
H
0

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.

Hanni answered 17/12, 2021 at 15:9 Comment(0)
M
-2

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.

Midwest answered 30/11, 2020 at 22:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.