Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure in listKernelsImplementation, perrmission error 2.0 #16399

Open
maxschmi opened this issue Jan 22, 2025 · 3 comments
Open

Failure in listKernelsImplementation, perrmission error 2.0 #16399

maxschmi opened this issue Jan 22, 2025 · 3 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug

Comments

@maxschmi
Copy link

maxschmi commented Jan 22, 2025

Environment data

  • VS Code version: 1.96.4
  • Jupyter Extension version: 2025.1.2024121801
  • Python Extension version: 2024.22.2
  • OS (Windows | Mac | Linux distro) and version: Windows, win32 (x64)
  • Python and/or Anaconda version: conda 24.7.1
  • Type of virtual environment used: conda
  • Jupyter server running: Local

Problem description

I again get exactly the same error as I described in #16123 even though it should have been fixed by now and I use the latest version.

Logs

13:10:29.443 [error] Failure in listKernelsImplementation [Error: EPERM: operation not permitted, mkdir 'C:\Program Files\Microsoft VS Code\~'] {
  errno: -4048,
  code: 'EPERM',
  syscall: 'mkdir',
  path: 'C:\\Program Files\\Microsoft VS Code\\~'
}

@maxschmi maxschmi added the bug Issue identified by VS Code Team member as probable bug label Jan 22, 2025
@maxschmi
Copy link
Author

maxschmi commented Jan 22, 2025

and here is the trace-log:

Visual Studio Code (1.96.4, undefined, desktop)
Jupyter Extension Version: 2025.1.2024121801.
Python Extension Version: 2024.22.2.
Pylance Extension Version: 2024.12.1.
Platform: win32 (x64).
Temp Storage folder ms2134\Profile\AppData\Code\User\globalStorage\ms-toolsai.jupyter\version-2025.1.2024121801
No workspace folder opened.
14:18:15.047 [debug] Start refreshing Kernel Picker (1737551895047)
14:18:15.097 [debug] Get Custom Env Variables, Class name = km, completed in 50ms, has a truthy return value, Arg 1: undefined, Arg 2: "RunPythonCode"
14:18:15.097 [debug] Jupyter Paths kernels: 
14:18:15.108 [debug] Kernel Spec Root Paths, ~\AppData\Roaming\jupyter\kernels, c:\ProgramData\jupyter\kernels
14:18:15.153 [debug] End refreshing Kernel Picker (1737551895047)
14:18:15.589 [trace] No controller, hence notebook communications cannot be initialized for editor e:\HydroApps\App-ressources\SFI_mockup\prepare_data_SFI.ipynb
14:18:15.589 [debug] Start refreshing Interpreter Kernel Picker
14:18:15.589 [debug] Start refreshing Kernel Picker (1737551895589)
14:18:17.932 [trace] Python API env change detected, add => 'C:\Program Files\Python310\python.exe'
14:18:17.933 [trace] Search for KernelSpecs in Interpreter c:\Program Files\Python310\python.exe
14:18:17.946 [error] Failure in listKernelsImplementation [Error: EPERM: operation not permitted, mkdir 'C:\Program Files\Microsoft VS Code\~'] {
  errno: -4048,
  code: 'EPERM',
  syscall: 'mkdir',
  path: 'C:\\Program Files\\Microsoft VS Code\\~'
}
14:18:17.949 [trace] Python API env change detected, add => 'E:\max_schmit\py_venv\geo_p310\Scripts\python.exe'
14:18:17.949 [trace] Search for KernelSpecs in Interpreter e:\max_schmit\py_venv\geo_p310\Scripts\python.exe
14:18:17.951 [error] Failure in listKernelsImplementation [Error: EPERM: operation not permitted, mkdir 'C:\Program Files\Microsoft VS Code\~'] {
  errno: -4048,
  code: 'EPERM',
  syscall: 'mkdir',
  path: 'C:\\Program Files\\Microsoft VS Code\\~'
}
14:18:17.959 [trace] Python API env change detected, add => 'C:\ProgramData\spyder-6\python.exe'
14:18:17.960 [trace] Search for KernelSpecs in Interpreter c:\ProgramData\spyder-6\python.exe
14:18:17.961 [error] Failure in listKernelsImplementation [Error: EPERM: operation not permitted, mkdir 'C:\Program Files\Microsoft VS Code\~'] {
  errno: -4048,
  code: 'EPERM',
  syscall: 'mkdir',
  path: 'C:\\Program Files\\Microsoft VS Code\\~'
}
14:18:17.962 [trace] Python API env change detected, add => 'C:\ProgramData\spyder-6\envs\spyder-runtime\python.exe'
14:18:17.963 [trace] Search for KernelSpecs in Interpreter c:\ProgramData\spyder-6\envs\spyder-runtime\python.exe
14:18:17.964 [error] Failure in listKernelsImplementation [Error: EPERM: operation not permitted, mkdir 'C:\Program Files\Microsoft VS Code\~'] {
  errno: -4048,
  code: 'EPERM',
  syscall: 'mkdir',
  path: 'C:\\Program Files\\Microsoft VS Code\\~'
}
14:18:17.997 [trace] Python API env change detected, add => 'C:\Conda\python.exe'
14:18:17.997 [trace] Search for KernelSpecs in Interpreter c:\Conda\python.exe
14:18:17.999 [error] Failure in listKernelsImplementation [Error: EPERM: operation not permitted, mkdir 'C:\Program Files\Microsoft VS Code\~'] {
  errno: -4048,
  code: 'EPERM',
  syscall: 'mkdir',
  path: 'C:\\Program Files\\Microsoft VS Code\\~'
}
14:18:18.001 [trace] Hiding default KernelSpec python for interpreter e:\max_schmit\py_venv\geo_p310\Scripts\python.exe (KernelSpec file e:\max_schmit\py_venv\geo_p310\share\jupyter\kernels\python3\kernel.json)
14:18:18.002 [trace] Python API env change detected, add => 'C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\python.exe'
14:18:18.002 [trace] Search for KernelSpecs in Interpreter c:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\python.exe
14:18:18.004 [error] Failure in listKernelsImplementation [Error: EPERM: operation not permitted, mkdir 'C:\Program Files\Microsoft VS Code\~'] {
  errno: -4048,
  code: 'EPERM',
  syscall: 'mkdir',
  path: 'C:\\Program Files\\Microsoft VS Code\\~'
}
14:18:18.006 [trace] Hiding default KernelSpec c:\ProgramData\spyder-6\envs\spyder-runtime\python.exe for interpreter c:\ProgramData\spyder-6\envs\spyder-runtime\python.exe (KernelSpec file c:\ProgramData\spyder-6\envs\spyder-runtime\share\jupyter\kernels\python3\kernel.json)
14:18:18.009 [trace] Python API env change detected, add => 'E:\HydroApps\python\python_venv\HydroApps\python.exe'
14:18:18.009 [trace] Search for KernelSpecs in Interpreter e:\HydroApps\python\python_venv\HydroApps\python.exe
14:18:18.010 [error] Failure in listKernelsImplementation [Error: EPERM: operation not permitted, mkdir 'C:\Program Files\Microsoft VS Code\~'] {
  errno: -4048,
  code: 'EPERM',
  syscall: 'mkdir',
  path: 'C:\\Program Files\\Microsoft VS Code\\~'
}
14:18:18.013 [trace] Python API env change detected, add => 'D:\conda_envs\qgis\python.exe'
14:18:18.013 [trace] Search for KernelSpecs in Interpreter d:\conda_envs\qgis\python.exe
14:18:18.015 [error] Failure in listKernelsImplementation [Error: EPERM: operation not permitted, mkdir 'C:\Program Files\Microsoft VS Code\~'] {
  errno: -4048,
  code: 'EPERM',
  syscall: 'mkdir',
  path: 'C:\\Program Files\\Microsoft VS Code\\~'
}
14:18:18.040 [trace] Python API env change detected, add => 'D:\conda_envs\anaconda-navigator\python.exe'
14:18:18.040 [trace] Search for KernelSpecs in Interpreter d:\conda_envs\anaconda-navigator\python.exe
14:18:18.041 [error] Failure in listKernelsImplementation [Error: EPERM: operation not permitted, mkdir 'C:\Program Files\Microsoft VS Code\~'] {
  errno: -4048,
  code: 'EPERM',
  syscall: 'mkdir',
  path: 'C:\\Program Files\\Microsoft VS Code\\~'
}
14:18:18.043 [trace] Python API env change detected, add => 'D:\conda_envs\geo_p310\python.exe'
14:18:18.043 [trace] Search for KernelSpecs in Interpreter d:\conda_envs\geo_p310\python.exe
14:18:18.045 [error] Failure in listKernelsImplementation [Error: EPERM: operation not permitted, mkdir 'C:\Program Files\Microsoft VS Code\~'] {
  errno: -4048,
  code: 'EPERM',
  syscall: 'mkdir',
  path: 'C:\\Program Files\\Microsoft VS Code\\~'
}
14:18:18.049 [trace] Python API env change detected, add => 'D:\conda_envs\geo_p312\python.exe'
14:18:18.049 [trace] Search for KernelSpecs in Interpreter d:\conda_envs\geo_p312\python.exe
14:18:18.051 [error] Failure in listKernelsImplementation [Error: EPERM: operation not permitted, mkdir 'C:\Program Files\Microsoft VS Code\~'] {
  errno: -4048,
  code: 'EPERM',
  syscall: 'mkdir',
  path: 'C:\\Program Files\\Microsoft VS Code\\~'
}
14:18:18.052 [trace] Hiding default KernelSpec e:\HydroApps\python\python_venv\HydroApps\python.exe for interpreter e:\HydroApps\python\python_venv\HydroApps\python.exe (KernelSpec file e:\HydroApps\python\python_venv\HydroApps\share\jupyter\kernels\python3\kernel.json)
14:18:18.053 [trace] Python API env change detected, add => 'D:\conda_envs\geo_p38\python.exe'
14:18:18.054 [trace] Search for KernelSpecs in Interpreter d:\conda_envs\geo_p38\python.exe
14:18:18.055 [error] Failure in listKernelsImplementation [Error: EPERM: operation not permitted, mkdir 'C:\Program Files\Microsoft VS Code\~'] {
  errno: -4048,
  code: 'EPERM',
  syscall: 'mkdir',
  path: 'C:\\Program Files\\Microsoft VS Code\\~'
}
14:18:18.058 [trace] Python API env change detected, add => 'D:\conda_envs\roger_all_p310\python.exe'
14:18:18.058 [trace] Search for KernelSpecs in Interpreter d:\conda_envs\roger_all_p310\python.exe
14:18:18.060 [error] Failure in listKernelsImplementation [Error: EPERM: operation not permitted, mkdir 'C:\Program Files\Microsoft VS Code\~'] {
  errno: -4048,
  code: 'EPERM',
  syscall: 'mkdir',
  path: 'C:\\Program Files\\Microsoft VS Code\\~'
}
14:18:18.067 [trace] Hiding default KernelSpec d:\conda_envs\geo_p310\python.exe for interpreter d:\conda_envs\geo_p310\python.exe (KernelSpec file d:\conda_envs\geo_p310\share\jupyter\kernels\python3\kernel.json)
14:18:18.070 [trace] Hiding default KernelSpec d:\conda_envs\geo_p312\python.exe for interpreter d:\conda_envs\geo_p312\python.exe (KernelSpec file d:\conda_envs\geo_p312\share\jupyter\kernels\python3\kernel.json)
14:18:18.072 [trace] Hiding default KernelSpec d:\conda_envs\geo_p38\python.exe for interpreter d:\conda_envs\geo_p38\python.exe (KernelSpec file d:\conda_envs\geo_p38\share\jupyter\kernels\python3\kernel.json)
14:18:18.073 [trace] Hiding default KernelSpec d:\conda_envs\roger_all_p310\python.exe for interpreter d:\conda_envs\roger_all_p310\python.exe (KernelSpec file d:\conda_envs\roger_all_p310\share\jupyter\kernels\python3\kernel.json)
14:18:18.077 [debug] Refreshed Environments
14:18:19.079 [debug] End refreshing Kernel Picker (1737551895589)
14:18:19.765 [debug] No interpreter for Pylance for Notebook URI "e:\HydroApps\App-ressources\SFI_mockup\prepare_data_SFI.ipynb"
14:18:21.429 [trace] Conda file is D:\conda_envs\anaconda-navigator\Scripts\conda.exe
14:18:41.195 [debug] Start refreshing Kernel Picker (1737551921195)
14:18:41.196 [trace] Search for KernelSpecs in Interpreter e:\HydroApps\python\python_venv\HydroApps\python.exe
14:18:41.197 [error] Failure in listKernelsImplementation [Error: EPERM: operation not permitted, mkdir 'C:\Program Files\Microsoft VS Code\~'] {
  errno: -4048,
  code: 'EPERM',
  syscall: 'mkdir',
  path: 'C:\\Program Files\\Microsoft VS Code\\~'
}
14:18:41.197 [trace] Hiding default KernelSpec e:\HydroApps\python\python_venv\HydroApps\python.exe for interpreter e:\HydroApps\python\python_venv\HydroApps\python.exe (KernelSpec file e:\HydroApps\python\python_venv\HydroApps\share\jupyter\kernels\python3\kernel.json)
14:18:41.198 [debug] End refreshing Kernel Picker (1737551921195)

So it seems for me, that it doesn't use ~ as home directory and therefor tries to create this folder in the VSCode installation folder.

@DonJayamanne
Copy link
Contributor

Thats weird, it looks like your permissions changed at some point.
I'm saying this as the directory was previously created by VS Code, and later creating other sub directories is now failing, meaning the permissions changed.

I do not think I've changed anything since then.

@maxschmi
Copy link
Author

Hmm that's weird. I didn't change anything in between. What folder did VSCode create and what folder does the jupyter extension want's to create. Maybe I can have a look inside.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

2 participants