Description
Trying to get Jedi working but ultimately receiving a silent (or not so silent) failure somewhere and it ends up running but not actually doing anything, no error hints, no nothing.
Here is my test file jedy.py which generates zero Problems in the tab:
#!/usr/bin/env python
test = zTask(id=1234, dueDate='baf')
print(test)
sszzz
s
/home/c0rn3j/.vscode/extensions/ms-python.python-2024.4.0/python_files/jedilsp_requirements/
does not seem to exist at all.
2024-04-10 13:51:10.171 [debug] Failed to get jedi-language-server version: [Error: ENOENT: no such file or directory, open '/home/c0rn3j/.vscode/extensions/ms-python.python-2024.4.0/python_files/jedilsp_requirements/requirements.txt'] {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/home/c0rn3j/.vscode/extensions/ms-python.python-2024.4.0/python_files/jedilsp_requirements/requirements.txt'
}
Can't provide the debug info because that's also broken:
2024-04-10 13:59:53.492 [error] TypeError: Cannot read properties of undefined (reading 'localeCompare')
at /home/c0rn3j/.vscode/extensions/ms-python.python-2024.4.0/out/client/extension.js:2:103188
at Array.sort (<anonymous>)
at _.openReportIssue (/home/c0rn3j/.vscode/extensions/ms-python.python-2024.4.0/out/client/extension.js:2:103149)
at async d.h (/usr/lib/code/out/vs/workbench/api/node/extensionHostProcess.js:152:186866) python.reportIssue {"value":"ms-python.python","_lower":"ms-python.python"}
2024-04-10 14:01:43.791 [error] TypeError: Cannot read properties of undefined (reading 'localeCompare')
at /home/c0rn3j/.vscode/extensions/ms-python.python-2024.4.0/out/client/extension.js:2:103188
at Array.sort (<anonymous>)
at _.openReportIssue (/home/c0rn3j/.vscode/extensions/ms-python.python-2024.4.0/out/client/extension.js:2:103149)
at async d.h (/usr/lib/code/out/vs/workbench/api/node/extensionHostProcess.js:152:186866) python.reportIssue {"value":"ms-python.python","_lower":"ms-python.python"}
VSC About:
Version: 1.88.0
Commit: 5c3e652f63e798a5ac2f31ffd0d863669328dc4c
Date: 2024-04-05T09:25:05.142Z
Electron: 28.2.10
ElectronBuildId: undefined
Chromium: 120.0.6099.291
Node.js: 18.18.2
V8: 12.0.267.19-electron.0
OS: Linux x64 6.8.2-arch2-1
CTRL+SHIFT+P
and selecting Developer: Restart Extension Host
while having Output tab open with logging changed to debug
is a good repro.
Python Language Server tab is just these lines with breaks in between:
2024-04-10 14:12:00.098 [info] WARNING:pygls.protocol:Cancel notification for unknown message id "1"
2024-04-10 14:12:00.113 [info] WARNING:pygls.protocol:Cancel notification for unknown message id "2"
2024-04-10 14:12:01.471 [info] WARNING:pygls.protocol:Cancel notification for unknown message id "7"
Enabling trace logging with the hidden conf parameter shows it's a race condition and probably not relevant to my problem:
024-04-10 15:21:35.979 [info] [Trace - 15:21:35] Sending request 'textDocument/documentHighlight - (34)'.
2024-04-10 15:21:35.979 [info] Params: {
"textDocument": {
"uri": "file:///home/c0rn3j/Nextcloud/HugeFiles/Projects/Nyx/main.py"
},
"position": {
"line": 25,
"character": 32
}
}
2024-04-10 15:21:35.980 [info] [Trace - 15:21:35] Sending notification '$/cancelRequest'.
2024-04-10 15:21:35.980 [info] Params: {
"id": 34
}
2024-04-10 15:21:35.982 [info] [Trace - 15:21:35] Received response 'textDocument/documentHighlight - (34)' in 3ms.
2024-04-10 15:21:35.982 [info] Result: [
{
"range": {
"start": {
"line": 25,
"character": 27
},
"end": {
"line": 25,
"character": 32
}
}
},
{
"range": {
"start": {
"line": 586,
"character": 26
},
"end": {
"line": 586,
"character": 31
}
}
}
]
2024-04-10 15:21:35.982 [info] WARNING:pygls.protocol:Cancel notification for unknown message id "34"
Full Python log, deduped:
2024-04-10 14:16:02.930 [debug] Start watching file for changes /home/c0rn3j/.conda/environments.txt
2024-04-10 14:16:02.930 [debug] Start watching: /home/c0rn3j/.conda with pattern environments.txt using VSCode API
2024-04-10 14:16:02.930 [debug] Start watching root /home/c0rn3j/Nextcloud/HugeFiles/Projects/configs for globs ["python","*/python","*/bin/python"]
2024-04-10 14:16:02.930 [debug] Start watching: /home/c0rn3j/Nextcloud/HugeFiles/Projects/configs with pattern python using VSCode API
2024-04-10 14:16:02.930 [debug] Start watching: /home/c0rn3j/Nextcloud/HugeFiles/Projects/configs with pattern */python using VSCode API
2024-04-10 14:16:02.930 [debug] Start watching: /home/c0rn3j/Nextcloud/HugeFiles/Projects/configs with pattern */bin/python using VSCode API
2024-04-10 14:16:02.930 [debug] Start watching root /home/c0rn3j/Nextcloud/HugeFiles/Projects/Nyx for globs ["python","*/python","*/bin/python"]
2024-04-10 14:16:02.930 [debug] Start watching: /home/c0rn3j/Nextcloud/HugeFiles/Projects/Nyx with pattern python using VSCode API
2024-04-10 14:16:02.930 [debug] Start watching: /home/c0rn3j/Nextcloud/HugeFiles/Projects/Nyx with pattern */python using VSCode API
2024-04-10 14:16:02.930 [debug] Start watching: /home/c0rn3j/Nextcloud/HugeFiles/Projects/Nyx with pattern */bin/python using VSCode API
2024-04-10 14:16:02.930 [debug] Start watching root /home/c0rn3j/AUR for globs ["python","*/python","*/bin/python"]
2024-04-10 14:16:02.930 [debug] Start watching: /home/c0rn3j/AUR with pattern python using VSCode API
2024-04-10 14:16:02.930 [debug] Start watching: /home/c0rn3j/AUR with pattern */python using VSCode API
2024-04-10 14:16:02.930 [debug] Start watching: /home/c0rn3j/AUR with pattern */bin/python using VSCode API
2024-04-10 14:16:02.930 [info] Default formatter is set to null for workspace /home/c0rn3j/Nextcloud/HugeFiles/Projects/configs
2024-04-10 14:16:02.930 [info] Default formatter is set to null for workspace /home/c0rn3j/Nextcloud/HugeFiles/Projects/Nyx
2024-04-10 14:16:02.930 [info] Default formatter is set to null for workspace /home/c0rn3j/AUR
2024-04-10 14:16:02.930 [debug] Waiting for test server to start...
2024-04-10 14:16:02.930 [info] Test server listening.
2024-04-10 14:16:02.930 [debug] Test server started.
2024-04-10 14:16:02.930 [debug] Testing: Setting up watcher for /home/c0rn3j/Nextcloud/HugeFiles/Projects/configs
2024-04-10 14:16:02.930 [debug] Testing: Setting up watcher for /home/c0rn3j/Nextcloud/HugeFiles/Projects/Nyx
2024-04-10 14:16:02.930 [debug] Testing: Setting up watcher for /home/c0rn3j/AUR
2024-04-10 14:16:02.930 [debug] Needed to validate /bin/python with latest info
2024-04-10 14:16:02.930 [info] Python interpreter path: /bin/python
2024-04-10 14:16:02.930 [debug] Found cached env for /bin/python
2024-04-10 14:16:02.940 [debug] Dump environment variables {
"CASROOT": "/usr",
"CHROME_DESKTOP": "code-oss.desktop",
"CSF_DrawPluginDefaults": "/usr/share/opencascade/resources/DrawResources",
"CSF_EXCEPTION_PROMPT": "1",
"CSF_IGESDefaults": "/usr/share/opencascade/resources/XSTEPResource",
"CSF_LANGUAGE": "us",
"CSF_MDTVTexturesDirectory": "/usr/share/opencascade/resources/Textures",
"CSF_MIGRATION_TYPES": "/usr/share/opencascade/resources/StdResource/MigrationSheet.txt",
"CSF_OCCTResourcePath": "/usr/share/opencascade/resources",
"CSF_PluginDefaults": "/usr/share/opencascade/resources/StdResource",
"CSF_SHMessage": "/usr/share/opencascade/resources/SHMessage",
"CSF_STEPDefaults": "/usr/share/opencascade/resources/XSTEPResource",
"CSF_ShadersDirectory": "/usr/share/opencascade/resources/Shaders",
"CSF_StandardDefaults": "/usr/share/opencascade/resources/StdResource",
"CSF_StandardLiteDefaults": "/usr/share/opencascade/resources/StdResource",
"CSF_TObjDefaults": "/usr/share/opencascade/resources/StdResource",
"CSF_TObjMessage": "/usr/share/opencascade/resources/TObj",
"CSF_XCAFDefaults": "/usr/share/opencascade/resources/StdResource",
"CSF_XSMessage": "/usr/share/opencascade/resources/XSMessage",
"CSF_XmlOcafResource": "/usr/share/opencascade/resources/XmlOcafResource",
"CUDA_PATH": "/opt/cuda",
"DBUS_SESSION_BUS_ADDRESS": "unix:path=/run/user/1000/bus",
"DEBUGINFOD_URLS": "https://debuginfod.archlinux.org ",
"DESKTOP_SESSION": "plasma",
"DISPLAY": ":1",
"DRAWDEFAULT": "/usr/share/opencascade/resources/DrawResources/DrawDefault",
"DRAWHOME": "/usr/share/opencascade/resources/DrawResources",
"ELECTRON_NO_ATTACH_CONSOLE": "1",
"ELECTRON_OZONE_PLATFORM_HINT": "auto",
"GDK_BACKEND": "wayland",
"GTK2_RC_FILES": "/etc/gtk-2.0/gtkrc:/home/c0rn3j/.gtkrc-2.0:/home/c0rn3j/.config/gtkrc-2.0",
"GTK_RC_FILES": "/etc/gtk/gtkrc:/home/c0rn3j/.gtkrc:/home/c0rn3j/.config/gtkrc",
"HG": "/usr/bin/hg",
"HOME": "/home/c0rn3j",
"INVOCATION_ID": "f74a5d0f08724979857e038723b0c164",
"JOURNAL_STREAM": "8:66358",
"KDE_APPLICATIONS_AS_SCOPE": "1",
"KDE_FULL_SESSION": "true",
"KDE_SESSION_UID": "1000",
"KDE_SESSION_VERSION": "6",
"LANG": "en_GB.UTF-8",
"LOGNAME": "c0rn3j",
"MAIL": "/var/spool/mail/c0rn3j",
"MANAGERPID": "12072",
"MEMORY_PRESSURE_WATCH": "/sys/fs/cgroup/user.slice/user-1000.slice/[email protected]/session.slice/plasma-plasmashell.service/memory.pressure",
"MEMORY_PRESSURE_WRITE": "c29tZSAyMDAwMDAgMjAwMDAwMAA=",
"MMGT_CLEAR": "1",
"MOTD_SHOWN": "pam",
"NO_AT_BRIDGE": "1",
"NVCC_PREPEND_FLAGS": "-ccbin /opt/cuda/bin",
"OLDPWD": "/home/c0rn3j",
"ORIGINAL_XDG_CURRENT_DESKTOP": "KDE",
"PAM_KWALLET5_LOGIN": "/run/user/1000/kwallet5.socket",
"PGDATA": "/var/lib/postgres/data",
"PWD": "/home/c0rn3j",
"QT_AUTO_SCREEN_SCALE_FACTOR": "0",
"QT_WAYLAND_RECONNECT": "1",
"SESSION_MANAGER": "local/Luxuria:@/tmp/.ICE-unix/12647,unix/Luxuria:/tmp/.ICE-unix/12647",
"SHELL": "/bin/zsh",
"SHLVL": "0",
"SSH_AUTH_SOCK": "/run/user/1000/gcr/ssh",
"SYSTEMD_EXEC_PID": "12666",
"USER": "c0rn3j",
"VSCODE_AMD_ENTRYPOINT": "vs/workbench/api/node/extensionHostProcess",
"VSCODE_CLI": "1",
"VSCODE_CODE_CACHE_PATH": "/home/c0rn3j/.config/Code/CachedData/5c3e652f63e798a5ac2f31ffd0d863669328dc4c",
"VSCODE_CRASH_REPORTER_PROCESS_TYPE": "extensionHost",
"VSCODE_CWD": "/home/c0rn3j",
"VSCODE_HANDLES_UNCAUGHT_ERRORS": "true",
"VSCODE_IPC_HOOK": "/run/user/1000/vscode-6e86ed9d-1.88-main.sock",
"VSCODE_NLS_CONFIG": "{\"locale\":\"en-us\",\"osLocale\":\"en-gb\",\"availableLanguages\":{},\"_languagePackSupport\":true}",
"VSCODE_PID": "1615179",
"WAYLAND_DISPLAY": "wayland-0",
"XAUTHORITY": "/run/user/1000/xauth_wRksSz",
"XDG_CONFIG_DIRS": "/home/c0rn3j/.config/kdedefaults:/etc/xdg",
"XDG_CURRENT_DESKTOP": "KDE",
"XDG_DATA_DIRS": "/home/c0rn3j/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share",
"XDG_MENU_PREFIX": "plasma-",
"XDG_RUNTIME_DIR": "/run/user/1000",
"XDG_SEAT": "seat0",
"XDG_SEAT_PATH": "/org/freedesktop/DisplayManager/Seat0",
"XDG_SESSION_CLASS": "user",
"XDG_SESSION_DESKTOP": "KDE",
"XDG_SESSION_ID": "2",
"XDG_SESSION_PATH": "/org/freedesktop/DisplayManager/Session1",
"XDG_SESSION_TYPE": "wayland",
"XDG_VTNR": "1",
"ELECTRON_RUN_AS_NODE": "1",
"PATH": "/opt/jython/bin/:/usr/local/sbin:/usr/local/bin:/usr/bin:/opt/cuda/bin:/opt/cuda/nsight_compute:/opt/cuda/nsight_systems/bin:/home/c0rn3j/.local/share/flatpak/exports/bin:/var/lib/flatpak/exports/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/sbin:/usr/lib/rustup/bin:/home/c0rn3j/.local/bin"
}
2024-04-10 14:16:02.943 [info] > pyenv which python
2024-04-10 14:16:02.943 [info] cwd: ~/Nextcloud/HugeFiles/Projects/configs
2024-04-10 14:16:02.976 [debug] Terminal name '' identified as shell 'other'
2024-04-10 14:16:02.976 [debug] Terminal shell path '/usr/bin/zsh' identified as shell 'zsh'
2024-04-10 14:16:02.976 [debug] Shell identified as zsh (Terminal name is )
2024-04-10 14:16:02.977 [debug] Found cached env for /bin/python
2024-04-10 14:16:03.205 [debug] Received shell integration sequence for zsh
2024-04-10 14:16:03.386 [info] Starting Jedi language server for configs.
2024-04-10 14:16:03.386 [debug] Found cached env for /bin/python
2024-04-10 14:16:03.387 [debug] Terminal shell path '/usr/bin/zsh' identified as shell 'zsh'
2024-04-10 14:16:03.387 [debug] Shell identified as zsh
2024-04-10 14:16:03.387 [debug] Found cached env for /bin/python
2024-04-10 14:16:03.899 [debug] Delay Trigger[Test Configuration Change]: triggered=3, called=1
2024-04-10 14:16:06.237 [debug] Found cached env for /bin/python
2024-04-10 14:16:06.713 [debug] Testing: Trigger refresh after saving /home/c0rn3j/Nextcloud/HugeFiles/Projects/Nyx/main.py
2024-04-10 14:16:06.980 [debug] Delay Trigger[Refresh Test Data]: triggered=5, called=1
2024-04-10 14:16:06.980 [info] Discover tests for workspace name: Nyx - uri: /home/c0rn3j/Nextcloud/HugeFiles/Projects/Nyx/main.py
2024-04-10 14:16:07.666 [debug] Testing: Trigger refresh after saving /home/c0rn3j/Nextcloud/HugeFiles/Projects/Nyx/main.py
2024-04-10 14:16:07.916 [debug] Delay Trigger[Refresh Test Data]: triggered=10, called=2
2024-04-10 14:16:07.916 [info] Discover tests for workspace name: Nyx - uri: /home/c0rn3j/Nextcloud/HugeFiles/Projects/Nyx/main.py
2024-04-10 14:16:08.498 [debug] Found cached env for /bin/python
2024-04-10 14:16:08.525 [info] > pyenv which python
2024-04-10 14:16:08.525 [info] cwd: ~/Nextcloud/HugeFiles/Projects/Nyx
2024-04-10 14:16:08.550 [debug] Found cached env for /bin/python
2024-04-10 14:16:08.853 [info] Starting Jedi language server for Nyx.
2024-04-10 14:16:08.853 [debug] Found cached env for /bin/python
2024-04-10 14:16:09.771 [debug] Testing: Trigger refresh after saving /home/c0rn3j/Nextcloud/HugeFiles/Projects/Nyx/jedi.py
2024-04-10 14:16:10.024 [debug] Delay Trigger[Refresh Test Data]: triggered=15, called=3
2024-04-10 14:16:10.024 [info] Discover tests for workspace name: Nyx - uri: /home/c0rn3j/Nextcloud/HugeFiles/Projects/Nyx/jedi.py
2024-04-10 14:16:10.765 [debug] Testing: Trigger refresh after saving /home/c0rn3j/Nextcloud/HugeFiles/Projects/Nyx/jedi.py
2024-04-10 14:16:11.014 [debug] Delay Trigger[Refresh Test Data]: triggered=20, called=4
2024-04-10 14:16:11.014 [info] Discover tests for workspace name: Nyx - uri: /home/c0rn3j/Nextcloud/HugeFiles/Projects/Nyx/jedi.py
2024-04-10 14:16:11.709 [debug] Received shell integration sequence for zsh
2024-04-10 14:16:17.808 [debug] Terminal name '' identified as shell 'other'
2024-04-10 14:16:17.808 [debug] Terminal shell path '/usr/bin/zsh' identified as shell 'zsh'
2024-04-10 14:16:17.808 [debug] Shell identified as zsh (Terminal name is )
2024-04-10 14:16:17.808 [debug] Found cached env for /bin/python
2024-04-10 14:16:18.030 [debug] Received shell integration sequence for zsh
2024-04-10 14:16:19.666 [debug] Found cached env for /bin/python
2024-04-10 14:16:29.604 [debug] Testing: Trigger refresh after saving /home/c0rn3j/Nextcloud/HugeFiles/Projects/Nyx/jedi.py
2024-04-10 14:16:29.853 [debug] Delay Trigger[Refresh Test Data]: triggered=25, called=5
2024-04-10 14:16:29.853 [info] Discover tests for workspace name: Nyx - uri: /home/c0rn3j/Nextcloud/HugeFiles/Projects/Nyx/jedi.py
2024-04-10 14:16:31.174 [debug] Testing: Trigger refresh after saving /home/c0rn3j/Nextcloud/HugeFiles/Projects/Nyx/jedi.py
2024-04-10 14:16:31.424 [debug] Delay Trigger[Refresh Test Data]: triggered=30, called=6
2024-04-10 14:16:31.424 [info] Discover tests for workspace name: Nyx - uri: /home/c0rn3j/Nextcloud/HugeFiles/Projects/Nyx/jedi.py
2024-04-10 14:16:34.378 [debug] Found cached env for /bin/python
EDIT: jedi.py test example renamed to jedy.py to not confuse imports.
Extensions:
# code --list-extensions
brunnerh.file-properties-viewer
charliermarsh.ruff
eamodio.gitlens
golang.go
hediet.vscode-drawio
johnpapa.vscode-peacock
johnstoncode.svn-scm
marlinfirmware.auto-build
mechatroner.rainbow-csv
ms-azuretools.vscode-docker
ms-python.debugpy
ms-python.python # v2024.4.0
ms-vscode.cmake-tools
ms-vscode.cpptools
ms-vscode.powershell
ms-vscode.vscode-serial-monitor
oderwat.indent-rainbow
platformio.platformio-ide
redhat.ansible
redhat.vscode-yaml
simonsiefke.svg-preview
timonwong.shellcheck
twxs.cmake
vsciot-vscode.vscode-arduino
settings.json
{
"git.confirmSync": false,
"editor.renderWhitespace": "boundary",
"window.zoomLevel": -1,
"git.autofetch": true,
"editor.detectIndentation": false,
"editor.tabSize": 2,
"editor.insertSpaces": false,
"explorer.confirmDelete": false,
"files.trimTrailingWhitespace": true,
"files.trimFinalNewlines": true,
"files.insertFinalNewline": true,
"diffEditor.ignoreTrimWhitespace": false,
"files.associations": {
"*.yml": "ansible",
"*.yaml": "ansible"
},
"python.languageServer": "Jedi",
"redhat.telemetry.enabled": false
}
On a side note, defining pyenv for env detection and then not having it installed will log an error to debug, instead of actually catching it and informing user via a notification, or at least not having the error be a debug level.
2024-04-10 13:51:10.145 [debug] [Error: Command failed: pyenv which python
/bin/sh: line 1: pyenv: command not found
at ChildProcess.exithandler (node:child_process:422:12)
at ChildProcess.emit (node:events:529:35)
at maybeClose (node:internal/child_process:1098:16)
at Socket.<anonymous> (node:internal/child_process:450:11)
at Socket.emit (node:events:517:28)
at Pipe.<anonymous> (node:net:350:12)] {
code: 127,
killed: false,
signal: null,
cmd: 'pyenv which python'
}