Permission Denied After installing WSL on windowns
- Dominant language
- Jupyter Notebook
- Stars
- 13.3k
- Forks
- 5.8k
- Avg merge
- 6d 11h
- Merged PRs (30d)
- 7
Description
Hi,
I have been using Jupyter Notebook on Mac and Windows without issues, but after I installed WSL(window subsystem linux), I cannot open jupyter notebook in my main windows system. I can launch the web server, but when I opened the old or new notebooks, I saw kernel error with the messages below.
`Traceback (most recent call last):
File "c:\python3\lib\site-packages\tornado\web.py", line 1699, in _execute
result = await result
File "c:\python3\lib\site-packages\tornado\gen.py", line 742, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "c:\python3\lib\site-packages\notebook\services\sessions\handlers.py", line 72, in post
type=mtype))
File "c:\python3\lib\site-packages\tornado\gen.py", line 735, in run
value = future.result()
File "c:\python3\lib\site-packages\tornado\gen.py", line 742, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "c:\python3\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 88, in create_session
kernel_id = yield self.start_kernel_for_session(session_id, path, name, type, kernel_name)
File "c:\python3\lib\site-packages\tornado\gen.py", line 735, in run
value = future.result()
File "c:\python3\lib\site-packages\tornado\gen.py", line 742, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "c:\python3\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 101, in start_kernel_for_session
self.kernel_manager.start_kernel(path=kernel_path, kernel_name=kernel_name)
File "c:\python3\lib\site-packages\tornado\gen.py", line 735, in run
value = future.result()
File "c:\python3\lib\site-packages\tornado\gen.py", line 209, in wrapper
yielded = next(result)
File "c:\python3\lib\site-packages\notebook\services\kernels\kernelmanager.py", line 168, in start_kernel
super(MappingKernelManager, self).start_kernel(**kwargs)
File "c:\python3\lib\site-packages\jupyter_client\multikernelmanager.py", line 110, in start_kernel
km.start_kernel(**kwargs)
File "c:\python3\lib\site-packages\jupyter_client\manager.py", line 240, in start_kernel
self.write_connection_file()
File "c:\python3\lib\site-packages\jupyter_client\connect.py", line 547, in write_connection_file
kernel_name=self.kernel_name
File "c:\python3\lib\site-packages\jupyter_client\connect.py", line 212, in write_connection_file
with secure_write(fname) as f:
File "c:\python3\lib\contextlib.py", line 112, in __enter__
return next(self.gen)
File "c:\python3\lib\site-packages\jupyter_client\connect.py", line 102, in secure_write
with os.fdopen(os.open(fname, open_flag, 0o600), mode) as f:
PermissionError: [Errno 13] Permission denied: 'C:\\Users\\Yli.ECHO\\AppData\\Roaming\\jupyter\\runtime\\kernel-9c3baad7-8b57-4d76-b198-d10d32db46e6.json'
`
when I run as administrator or run jupyter notebooks in WSL, I'm still able to access the files. Only when I'm in the main system, the problem above appears. This is like a mystery that bugs me... Please help if you can.
Contributor guide
Research direction
The traceback enters notebook/services/sessions/sessionmanager.py and jupyter_client/connect.py, especially secure_write. Start by reproducing the Windows/WSL setup and checking kernel connection-file creation; done would require identifying a confirmed project-side cause and appropriate regression coverage or documentation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- jupyter-notebook, python
- Domain
- backend, devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100