What to do if NotADirectoryError: [Errno 20] Not a directory:'xdg-settings' appears in jupyter notebook
Execution environment
- Mac Catalina
- python=3.8.1
- jupyter-notebook=6.0.3
--Use anaconda virtual environment
Contents of the error
When I tried to open jupyter notebook, I got the following error.
......
NotADirectoryError: [Errno 20] Not a directory: 'xdg-settings'
How to improve
- Open the
webbrowser.py
(which should have the absolute path) included in the error statement.
- Look up
xdg-settings
in webbrowser.py
. (Line 534 in my environment)
- A little above that (15 lines up in my environment) ʻif sys.platform [: 3] == "win":
to ʻelif sys.platform [: 3] ==" win ":
Change to.
- After saving your changes, run jupyter notebook again to open it! !!
References
- https://github.com/jupyter/notebook/issues/3746