You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Whenever I save a python file, vscode gets stuck executing formatters.
Steps to reproduce:
Save any Python file.
Diagnostic data
Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)
Failed to import test module: tests
Traceback (most recent call last):
File "/nix/store/kjgslpdqchx1sm7a5h9xibi5rrqcqfnl-python3-3.12.8/lib/python3.12/unittest/loader.py", line 429, in _find_test_path
package = self._get_module_from_name(name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/kjgslpdqchx1sm7a5h9xibi5rrqcqfnl-python3-3.12.8/lib/python3.12/unittest/loader.py", line 339, in _get_module_from_name
__import__(name)
File "/home/yajo/prodevel/test16-odoo/odoo/custom/src/partner-contact/partner_contact_department/tests/__init__.py", line 3, in <module>
from . import test_recursion
File "/home/yajo/prodevel/test16-odoo/odoo/custom/src/partner-contact/partner_contact_department/tests/test_recursion.py", line 3, in <module>
from odoo.exceptions import UserError
ModuleNotFoundError: No module named 'odoo'
2025-03-05 13:50:30.784 [error] Test Discovery named pipe /run/user/1000/python-test-discovery-4cb9f4f4593c2be6e0a9 error: TypeError: Cannot read properties of null (reading 'path')
at e (/home/yajo/.vscode/extensions/ms-python.python-2025.0.0-linux-x64/out/client/extension.js:2:931360)
at t.PythonResultResolver._resolveDiscovery (/home/yajo/.vscode/extensions/ms-python.python-2025.0.0-linux-x64/out/client/extension.js:2:916088)
at t.PythonResultResolver.resolveDiscovery (/home/yajo/.vscode/extensions/ms-python.python-2025.0.0-linux-x64/out/client/extension.js:2:915172)
at /home/yajo/.vscode/extensions/ms-python.python-2025.0.0-linux-x64/out/client/extension.js:2:966891
at b.callback (/home/yajo/.vscode/extensions/ms-python.python-2025.0.0-linux-x64/out/client/extension.js:2:930904)
at Object.thunk (/home/yajo/.vscode/extensions/ms-python.python-2025.0.0-linux-x64/out/client/extension.js:2:1993657)
2025-03-05 13:50:55.222 [info] El experimento \"pythonRecommendTensorboardExt\" está activo
2025-03-05 13:50:55.222 [info] El experimento \"pythonSurveyNotificationcf\" está activo
2025-03-05 13:50:55.222 [info] El experimento \"pythonTerminalEnvVarActivation\" está activo
2025-03-05 13:50:55.222 [info] El experimento \"pythonTestAdapter\" está activo
2025-03-05 13:50:55.222 [info] Native locator: Refresh started
2025-03-05 13:50:55.688 [info] > pyenv which python
2025-03-05 13:50:55.688 [info] cwd: ~/prodevel/test16-odoo/odoo/custom/src/partner-contact
2025-03-05 13:50:57.835 [info] > python3 -c "import sys;print(sys.executable)"
2025-03-05 13:51:07.734 [info] > pyenv which python
2025-03-05 13:51:07.734 [info] cwd: ~/prodevel/test16-odoo/odoo/custom/src/odoo
2025-03-05 13:52:28.980 [info] Poetry environment manager found at: /etc/profiles/per-user/yajo/bin/poetry
2025-03-05 13:53:05.916 [info] Native locator: Refresh finished in 134215 ms
2025-03-05 13:53:14.458 [info] Ruta de acceso del intérprete de Python: /etc/profiles/per-user/yajo/bin/python
2025-03-05 13:53:14.460 [info] Iniciando el servidor de lenguaje Pylance.
2025-03-05 13:53:43.137 [info] Iniciando el servidor de lenguaje Pylance.
Extension version: 2025.0.0
VS Code version: Code 1.97.2 (e54c774e0add60467559eb0d1e229c6452cf8447, 2025-02-12T23:20:35.343Z)
OS version: Linux x64 6.12.10-zen1
Modes:
Python version (& distribution if applicable, e.g. Anaconda): 3.11.9
Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Global
Value of the python.languageServer setting: Default
User Settings
Multiroot scenario, following user settings may not apply:
languageServer: "Pylance"
terminal
• activateEnvironment: false
@yajo Do you have any particular formatter installed for python? When you right click on the file in the editor and select the Format Document With... option what do you see?
I had something similar show up recently. I haven't dug into it too much. I have charliermarsh.ruff version 2025.14.0 set as my "format on save" formatter.
Not sure if it's related or not, but I also noticed this 100% CPU usage for a python file in the VSCode Process Explorer at the same time:
The python extension itself does not register any formatters. The notification you see is coming from core. But it could be slowed down by analysis running. So it might help figure out if and where such spike is occuring.
Type: Bug
Behaviour
Whenever I save a python file, vscode gets stuck executing formatters.
Steps to reproduce:
Diagnostic data
Output for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)Extension version: 2025.0.0
VS Code version: Code 1.97.2 (e54c774e0add60467559eb0d1e229c6452cf8447, 2025-02-12T23:20:35.343Z)
OS version: Linux x64 6.12.10-zen1
Modes:
python.languageServer
setting: DefaultUser Settings
Installed Extensions
System Info
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
webnn: disabled_off
A/B Experiments
The text was updated successfully, but these errors were encountered: