Skip to content

PET exited unexpectedly with code null, signal SIGTERM #1460

@lagamura

Description

@lagamura

PET is failing to find activate my vitual environment created by uv although the PET terminal tool is successfully identifying it:

Note: I am working via remote-ssh session
with the following

settings.json:
{
    "github.copilot.chat.codesearch.enabled": true,
    "containers.containerClient": "com.microsoft.visualstudio.containers.docker",
    "[python]": {
        "editor.defaultFormatter": "charliermarsh.ruff"
    },
    "python.defaultInterpreterPath": "${workspaceFolder}/.venv/bin/python",
    "python.useEnvironmentsExtension": true,
    "python-envs.alwaysUseUv": true,
    "python-envs.defaultEnvManager": "ms-python.python:venv",
    "python.terminal.useEnvFile": false,
    "ty.inlayHints.variableTypes": false,
    "ty.inlayHints.callArgumentNames": false,
    "python.testing.pytestEnabled": true,
    "python.testing.unittestEnabled": false,
    "python.testing.pytestArgs": [
    ],
    "window.zoomLevel": 0.7,
    "terminal.integrated.enablePersistentSessions": true,
}
PET Terminal logs:
/home/user/.vscode-server/extensions/ms-python.vscode-python-envs-1.26.0/python-env-tools/bin/pet resolve .venv/bin/python
Environment found for ".venv/bin/python"
Environment (Uv)
   Name        : hrvpp2
   Executable  : .venv/bin/python
   Version     : 3.11.13.final.0
   Prefix      : /data/users/Private/user/hrvpp2/.venv
   Architecture: x64
   Symlinks    : ".venv/bin/python"
               : ".venv/bin/python3"
               : ".venv/bin/python3.11"
               : "/data/users/Private/user/hrvpp2/.venv/bin/python"

Resolve completed in 401ms
Python Environments output
2026-04-15 15:43:09.032 [info] Python-envs extension version: 1.26.0
2026-04-15 15:43:09.032 [info] 
=== Python Envs Configuration Levels ===
2026-04-15 15:43:09.032 [info] {
  "section": "Python Envs Configuration Levels",
  "defaultEnvManager": {
    "workspaceFolderValue": "undefined",
    "workspaceValue": "undefined",
    "globalValue": "ms-python.python:venv",
    "defaultValue": "ms-python.python:venv"
  },
  "defaultPackageManager": {
    "workspaceFolderValue": "undefined",
    "workspaceValue": "undefined",
    "globalValue": "undefined",
    "defaultValue": "ms-python.python:pip"
  }
}
2026-04-15 15:43:09.032 [info] [pet] Starting Python Locator /home/steliosvito/.vscode-server/extensions/ms-python.vscode-python-envs-1.26.0/python-env-tools/bin/pet server
2026-04-15 15:43:09.032 [info] Using conda from persistent state: /usr/bin/conda
2026-04-15 15:43:09.032 [info] Conda Sourcing Status:
├─ Conda Path: /usr/bin/conda
├─ Conda Folder: /usr
├─ Active on Launch: true
└─ No Shell-specific Sourcing Scripts Found
2026-04-15 15:43:09.032 [info] [pet] configure: Sending configuration update: {"workspaceDirectories":["/home/steliosvito/Private/hrvpp2"],"environmentDirectories":["/home/steliosvito/Private/hrvpp2/**/.venv"],"pipenvExecutable":"pipenv","poetryExecutable":"poetry","cacheDirectory":"/home/steliosvito/.vscode-server/data/User/globalStorage/ms-python.vscode-python-envs/pythonLocator"}
2026-04-15 15:43:10.562 [info] [pet] configure: Sending configuration update: {"workspaceDirectories":["/home/steliosvito/Private/hrvpp2"],"environmentDirectories":["/home/steliosvito/Private/hrvpp2/**/.venv"],"pipenvExecutable":"pipenv","poetryExecutable":"poetry","cacheDirectory":"/home/steliosvito/.vscode-server/data/User/globalStorage/ms-python.vscode-python-envs/pythonLocator"}
2026-04-15 15:43:10.564 [info] [pet] configure: Sending configuration update: {"workspaceDirectories":["/home/steliosvito/Private/hrvpp2"],"environmentDirectories":["/home/steliosvito/Private/hrvpp2/**/.venv"],"pipenvExecutable":"pipenv","poetryExecutable":"poetry","cacheDirectory":"/home/steliosvito/.vscode-server/data/User/globalStorage/ms-python.vscode-python-envs/pythonLocator"}
2026-04-15 15:43:38.714 [warning] [pet] Configure request timed out (attempt 1/2), will retry on next request without killing process
2026-04-15 15:43:38.715 [error] [pet] Error refreshing Request 'configure' timed out after 30000ms
2026-04-15 15:43:38.716 [info] [pet] configure: Sending configuration update: {"workspaceDirectories":["/home/steliosvito/Private/hrvpp2"],"environmentDirectories":["/home/steliosvito/Private/hrvpp2/**/.venv"],"pipenvExecutable":"pipenv","poetryExecutable":"poetry","cacheDirectory":"/home/steliosvito/.vscode-server/data/User/globalStorage/ms-python.vscode-python-envs/pythonLocator"}
2026-04-15 15:43:38.716 [info] [pet] configure: Using extended timeout of 60000ms (retry 1)
2026-04-15 15:43:38.717 [info] Pipenv not found, turning off pipenv features. If you have pipenv installed in a non-standard location, set the "python.pipenvPath" setting. [b: Request 'configure' timed out after 30000ms
	at Timeout.<anonymous> (/home/steliosvito/.vscode-server/extensions/ms-python.vscode-python-envs-1.26.0/dist/extension.js:2:547144)
	at listOnTimeout (node:internal/timers:585:17)
	at process.processTimers (node:internal/timers:521:7)] {
  method: 'configure',
  failureStage: 'getPipenv:nativeFinderRefresh'
}
2026-04-15 15:43:38.721 [error] [pet] Failed to find handler for method: $/cancelRequest
2026-04-15 15:43:40.563 [error] [pet] Configure timed out on consecutive attempts, killing hung process for restart
2026-04-15 15:43:40.563 [info] [pet] Killing hung/crashed PET process
2026-04-15 15:43:40.564 [warning] [pet] Restarting Python Environment Tools (attempt 1/3, waiting 1000ms)
2026-04-15 15:43:40.564 [error] [pet] configure: Configuration error Pending response rejected since connection got disposed
2026-04-15 15:43:40.564 [error] [pet] configure: Configuration error Pending response rejected since connection got disposed
2026-04-15 15:43:40.564 [error] [pet] Error refreshing Pending response rejected since connection got disposed
2026-04-15 15:43:40.565 [info] Refreshing conda environments (hardRefresh=false)
2026-04-15 15:43:40.565 [info] Pyenv not found, turning off pyenv features. [l [Error]: Pending response rejected since connection got disposed
	at Object.dispose (/home/steliosvito/.vscode-server/extensions/ms-python.vscode-python-envs-1.26.0/dist/extension.js:2:688803)
	at /home/steliosvito/.vscode-server/extensions/ms-python.vscode-python-envs-1.26.0/dist/extension.js:2:548913
	at Array.forEach (<anonymous>)
	at T.restart (/home/steliosvito/.vscode-server/extensions/ms-python.vscode-python-envs-1.26.0/dist/extension.js:2:548900)
	at T.ensureProcessRunning (/home/steliosvito/.vscode-server/extensions/ms-python.vscode-python-envs-1.26.0/dist/extension.js:2:548616)
	at T.resolve (/home/steliosvito/.vscode-server/extensions/ms-python.vscode-python-envs-1.26.0/dist/extension.js:2:547727)
	at t.resolveSystemPythonEnvironmentPath (/home/steliosvito/.vscode-server/extensions/ms-python.vscode-python-envs-1.26.0/dist/extension.js:2:510776)
	at t.resolveVenvPythonEnvironmentPath (/home/steliosvito/.vscode-server/extensions/ms-python.vscode-python-envs-1.26.0/dist/extension.js:2:544300)
	at async t.VenvManager.resolve (/home/steliosvito/.vscode-server/extensions/ms-python.vscode-python-envs-1.26.0/dist/extension.js:2:526540)
	at async t.handlePythonPath (/home/steliosvito/.vscode-server/extensions/ms-python.vscode-python-envs-1.26.0/dist/extension.js:2:290111)
	at async p.resolveEnvironment (/home/steliosvito/.vscode-server/extensions/ms-python.vscode-python-envs-1.26.0/dist/extension.js:2:369694)
	at async E.resolveEnv (/home/steliosvito/.vscode-server/extensions/ms-python.python-2026.4.0/out/client/extension.js:2:469661)
	at async /home/steliosvito/.vscode-server/extensions/ms-python.python-2026.4.0/out/client/extension.js:2:477870
	at async u (/home/steliosvito/.vscode-server/extensions/astral-sh.ty-2026.36.0/dist/extension.js:1:54983)
	at async t.initializePython (/home/steliosvito/.vscode-server/extensions/astral-sh.ty-2026.36.0/dist/extension.js:1:54405)
	at async Immediate.<anonymous> (/home/steliosvito/.vscode-server/extensions/astral-sh.ty-2026.36.0/dist/extension.js:1:399083)] {
  code: -32097,
  data: undefined,
  failureStage: 'getPyenv:nativeFinderRefresh'
}
2026-04-15 15:43:40.572 [info] Poetry not found, turning off poetry features. [Error: Python Environment Tools (PET) is currently restarting. Please try again.
	at T.ensureProcessRunning (/home/steliosvito/.vscode-server/extensions/ms-python.vscode-python-envs-1.26.0/dist/extension.js:2:548233)
	at T.doRefreshAttempt (/home/steliosvito/.vscode-server/extensions/ms-python.vscode-python-envs-1.26.0/dist/extension.js:2:553477)
	at T.doRefresh (/home/steliosvito/.vscode-server/extensions/ms-python.vscode-python-envs-1.26.0/dist/extension.js:2:553122)
	at c.workerFunc (/home/steliosvito/.vscode-server/extensions/ms-python.vscode-python-envs-1.26.0/dist/extension.js:2:547662)
	at o.workFunc (/home/steliosvito/.vscode-server/extensions/ms-python.vscode-python-envs-1.26.0/dist/extension.js:2:292528)
	at o.start (/home/steliosvito/.vscode-server/extensions/ms-python.vscode-python-envs-1.26.0/dist/extension.js:2:291343)] {
  failureStage: 'getPoetry:nativeFinderRefresh'
}
2026-04-15 15:43:40.575 [info] [interpreterSelection] Applying initial environment selection for 1 workspace folder(s)
2026-04-15 15:43:40.579 [error] Failed to refresh native finder for conda environments [Error: Python Environment Tools (PET) is currently restarting. Please try again.
	at T.ensureProcessRunning (/home/steliosvito/.vscode-server/extensions/ms-python.vscode-python-envs-1.26.0/dist/extension.js:2:548233)
	at T.doRefreshAttempt (/home/steliosvito/.vscode-server/extensions/ms-python.vscode-python-envs-1.26.0/dist/extension.js:2:553477)
	at T.doRefresh (/home/steliosvito/.vscode-server/extensions/ms-python.vscode-python-envs-1.26.0/dist/extension.js:2:553122)
	at c.workerFunc (/home/steliosvito/.vscode-server/extensions/ms-python.vscode-python-envs-1.26.0/dist/extension.js:2:547662)
	at o.workFunc (/home/steliosvito/.vscode-server/extensions/ms-python.vscode-python-envs-1.26.0/dist/extension.js:2:292528)
	at o.start (/home/steliosvito/.vscode-server/extensions/ms-python.vscode-python-envs-1.26.0/dist/extension.js:2:291343)]
2026-04-15 15:43:40.579 [error] Failed to refresh native finder: Python Environment Tools (PET) is currently restarting. Please try again.
2026-04-15 15:43:40.587 [warning] Unable to handle /home/steliosvito/Private/hrvpp2/zarr_era5/.venv/bin/python
2026-04-15 15:43:40.592 [warning] Unable to handle /home/steliosvito/Private/hrvpp2/zarr_era5/.venv/bin/python
2026-04-15 15:43:40.598 [error] [pet] Python Environment Tools exited unexpectedly with code null, signal SIGTERM
2026-04-15 15:43:40.613 [info] [interpreterSelection] hrvpp2: none (source: defaultEnvManager)
2026-04-15 15:43:40.621 [error] [interpreterSelection] Failed to set global environment: Error: Python Environment Tools (PET) is currently restarting. Please try again.
2026-04-15 15:43:40.631 [warning] No Python environments were found. Try running "Python Environments: Run Python Environment Tool (PET) in Terminal..." from the Command Palette to diagnose. If environments should be detected, please report this: https://github.com/microsoft/vscode-python-environments/issues/new
2026-04-15 15:43:41.573 [info] [pet] Starting Python Locator /home/steliosvito/.vscode-server/extensions/ms-python.vscode-python-envs-1.26.0/python-env-tools/bin/pet server
2026-04-15 15:43:41.573 [info] [pet] Python Environment Tools restarted successfully
2026-04-15 15:43:41.573 [info] [pet] configure: Sending configuration update: {"workspaceDirectories":["/home/steliosvito/Private/hrvpp2"],"environmentDirectories":["/home/steliosvito/Private/hrvpp2/**/.venv"],"pipenvExecutable":"pipenv","poetryExecutable":"poetry","cacheDirectory":"/home/steliosvito/.vscode-server/data/User/globalStorage/ms-python.vscode-python-envs/pythonLocator"}
2026-04-15 15:43:58.955 [info] [pet] configure: Sending configuration update: {"workspaceDirectories":["/home/steliosvito/Private/hrvpp2"],"environmentDirectories":["/home/steliosvito/Private/hrvpp2/**/.venv"],"pipenvExecutable":"pipenv","poetryExecutable":"poetry","cacheDirectory":"/home/steliosvito/.vscode-server/data/User/globalStorage/ms-python.vscode-python-envs/pythonLocator"}
2026-04-15 15:44:11.573 [warning] [pet] Configure request timed out (attempt 1/2), will retry on next request without killing process
2026-04-15 15:44:11.574 [info] [pet] configure: Sending configuration update: {"workspaceDirectories":["/home/steliosvito/Private/hrvpp2"],"environmentDirectories":["/home/steliosvito/Private/hrvpp2/**/.venv"],"pipenvExecutable":"pipenv","poetryExecutable":"poetry","cacheDirectory":"/home/steliosvito/.vscode-server/data/User/globalStorage/ms-python.vscode-python-envs/pythonLocator"}
2026-04-15 15:44:11.574 [info] [pet] configure: Using extended timeout of 60000ms (retry 1)
2026-04-15 15:44:11.574 [error] [pet] Failed to find handler for method: $/cancelRequest
2026-04-15 15:44:28.956 [error] [pet] Configure timed out on consecutive attempts, killing hung process for restart
2026-04-15 15:44:28.956 [info] [pet] Killing hung/crashed PET process
2026-04-15 15:44:28.956 [warning] [pet] Restarting Python Environment Tools (attempt 2/3, waiting 2000ms)
2026-04-15 15:44:28.956 [error] [pet] configure: Configuration error Pending response rejected since connection got disposed
2026-04-15 15:44:28.956 [warning] Unable to handle /home/steliosvito/Private/hrvpp2/zarr_era5/.venv/bin/python
2026-04-15 15:44:28.960 [warning] Unable to handle /home/steliosvito/Private/hrvpp2/zarr_era5/.venv/bin/python
2026-04-15 15:44:28.962 [error] [pet] Python Environment Tools exited unexpectedly with code null, signal SIGTERM
2026-04-15 15:44:30.965 [info] [pet] Starting Python Locator /home/steliosvito/.vscode-server/extensions/ms-python.vscode-python-envs-1.26.0/python-env-tools/bin/pet server
2026-04-15 15:44:30.965 [info] [pet] Python Environment Tools restarted successfully
2026-04-15 15:44:30.967 [info] [pet] configure: Sending configuration update: {"workspaceDirectories":["/home/steliosvito/Private/hrvpp2"],"environmentDirectories":["/home/steliosvito/Private/hrvpp2/**/.venv"],"pipenvExecutable":"pipenv","poetryExecutable":"poetry","cacheDirectory":"/home/steliosvito/.vscode-server/data/User/globalStorage/ms-python.vscode-python-envs/pythonLocator"}
2026-04-15 15:45:00.968 [warning] [pet] Configure request timed out (attempt 1/2), will retry on next request without killing process
2026-04-15 15:45:00.969 [info] [pet] configure: Sending configuration update: {"workspaceDirectories":["/home/steliosvito/Private/hrvpp2"],"environmentDirectories":["/home/steliosvito/Private/hrvpp2/**/.venv"],"pipenvExecutable":"pipenv","poetryExecutable":"poetry","cacheDirectory":"/home/steliosvito/.vscode-server/data/User/globalStorage/ms-python.vscode-python-envs/pythonLocator"}
2026-04-15 15:45:00.969 [info] [pet] configure: Using extended timeout of 60000ms (retry 1)
2026-04-15 15:45:00.969 [error] [pet] Failed to find handler for method: $/cancelRequest
2026-04-15 15:46:00.969 [error] [pet] Configure timed out on consecutive attempts, killing hung process for restart
2026-04-15 15:46:00.969 [info] [pet] Killing hung/crashed PET process
2026-04-15 15:46:00.970 [warning] [pet] Restarting Python Environment Tools (attempt 3/3, waiting 4000ms)
2026-04-15 15:46:00.970 [error] [pet] Python Environment Tools exited unexpectedly with code null, signal SIGTERM
2026-04-15 15:46:04.978 [info] [pet] Starting Python Locator /home/steliosvito/.vscode-server/extensions/ms-python.vscode-python-envs-1.26.0/python-env-tools/bin/pet server
2026-04-15 15:46:04.978 [info] [pet] Python Environment Tools restarted successfully
2026-04-15 15:46:04.978 [info] [pet] configure: Sending configuration update: {"workspaceDirectories":["/home/steliosvito/Private/hrvpp2"],"environmentDirectories":["/home/steliosvito/Private/hrvpp2/**/.venv"],"pipenvExecutable":"pipenv","poetryExecutable":"poetry","cacheDirectory":"/home/steliosvito/.vscode-server/data/User/globalStorage/ms-python.vscode-python-envs/pythonLocator"}
2026-04-15 15:46:34.979 [warning] [pet] Configure request timed out (attempt 1/2), will retry on next request without killing process
2026-04-15 15:46:34.979 [warning] Unable to handle /home/steliosvito/Private/hrvpp2/.venv/bin/python
2026-04-15 15:46:34.980 [error] [pet] Failed to find handler for method: $/cancelRequest

What it is probably relevant, is that my workspace has two nested uv environments.

├── .venv
├── .vscode
└── zarr_era5
    ├── .venv
    ├── .vscode
    └── zarr_era5.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions