jupyter / jupyter/notebook

Server error

Open
#5,274 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
13.3k
Forks
5.8k
Avg merge
6d 11h
Merged PRs (30d)
7

Description

I am trying to open jupyter notebook on my MacBook Air running macOS v10.15.3 (19D76) . I am getting the following and I'm not able to open my files. Help pls.

Uncaught exception GET /api/contents?type=directory&_=1583743980194 (::1)
HTTPServerRequest(protocol='http', host='localhost:8888', method='GET', uri='/api/contents?type=directory&_=1583743980194', version='HTTP/1.1', remote_ip='::1')
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tornado/web.py", line 1703, in _execute
result = await result
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tornado/gen.py", line 209, in wrapper
yielded = next(result)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/notebook/services/contents/handlers.py", line 112, in get
path=path, type=type, format=format, content=content,
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/notebook/services/contents/filemanager.py", line 427, in get
model = self._dir_model(path, content=content)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/notebook/services/contents/filemanager.py", line 334, in _dir_model
if self.allow_hidden or not is_file_hidden(os_path, stat_res=st):
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/notebook/utils.py", line 149, in is_file_hidden_posix
stat_res = os.stat(abs_path)
NotADirectoryError: [Errno 20] Not a directory: '/Users/adhishwar/mysql.sock'

Contributor guide

Open the contributing guide

Research direction

Start with the GET /api/contents entry point in notebook/services/contents/handlers.py, then trace _dir_model in notebook/services/contents/filemanager.py and is_file_hidden_posix in notebook/utils.py. Reproduce the request against the path containing /Users/adhishwar/mysql.sock; done means opening the notebook file listing no longer raises NotADirectoryError.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter-notebook, macos, python
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.