I'm getting a common error, but the chmod solutions I've found don't seem to be working.
When I create a Jupyter notebook through terminal, by running jupyter notebook, on Ubuntu 19.10, I get this error I'm sure many are familiar with:
The file at file:///home/vurnhat/.local/share/jupyter/runtime/nbserver-25715-open.html is not readable. It may have been removed, moved, or file permissions may be preventing access.I've manually pasted the link into Firefox and it works. Is there any way I can change some setting in my Chromium browser to get it to work there?
24 Answers
I had the same issue. I don't know what the problem is with Chrome, but a quick "fix" for me was to run:
jupyter notebook --browser firefoxso I don't have to copy-paste the link in Firefox.
The issue is chromium being a snap app in Ubuntu, if the URL is used instead of the html file, the issue is resolved.jupyter notebook --generate-configwill output the directory for config file, edit it and add this linec.NotebookApp.use_redirect_file = False
Your issue is probably be related to Chromium being a snap app. According to this Stack Overflow answer:
With recent versions of snap, applications installed with snap can't by default open files in hidden folders (with a name starting by
.).In Ubuntu 20.04, chromium is installed with snap (even when using the command
sudo apt install chromium-browser), so chromium can't open the html file used by Jupyter.As stated by @rahul-sood, a simple workaround is to copy-paste one of the alternative links given by Jupyter in the terminal (starting by or ).
This snap issue is also mentioned in this Ask Ubuntu answer:
The Snap 'home' interfacepermits access only to non-hidden files and directories in a user's /home.
The Snap 'personal-files' interfacepermits access to all files and directories in a user's /home.
- Snap interfaces are defined in the yaml file used in snap creation.
- The
personal-filesinterface requires an additional$snap connect foo:foo-connect. Thehomeinterface does not, which makes it more convenient for some uses.
Also see this relevant thread in the snapcraft forum: Can browsers open local files?
Summarizing, this is probably an issue due to Chromium being a snap application. Your options are:
Copy and paste one of the links starting with or in Chromium to open your notebook in it.
Use another non-snap browser as default.
Use the command mentioned by Salvatore Lampitelli to open the notebook in the specified non-snap browser.
Generate a jupyter config file in terminal using commands:
jupyter notebook --generate-configopen the script jupyter_notebook_config.py in the directory
/.jupyter and uncomment the line 531 :
Set c.NotebookApp.use_redirect_file = Truetoc.NotebookApp.use_redirect_file = False.
It will work.