Environment data
- VS Code version: 1.48.2
- Extension version (available under the Extensions sidebar): Version: 1.48.2
- OS and version: Arch Linux, 5.8.7-arch1-1
- Python version (& distribution if applicable, e.g. Anaconda): 3.8.5
- Type of virtual environment used (N/A | venv | virtualenv | conda | ...): poetry (virtualenv maybe)
- Relevant/affected Python packages and their versions: XXX
- Relevant/affected Python-related VS Code extensions and their versions: ms-python.python
- Value of the
python.languageServer setting: Mircrosoft
Expected behaviour
Opening a terminal automatically activates the selected virtual environment, by running
source <python.venvpath>/bin/activate.fish
Actual behaviour
Fish errors because it runs:
source <python.venvpath>/bin/activate
This is for bash shells
Steps to reproduce:
[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]
- Setup Fish by adding this to the end of ~/.bashrc
if [[ $(ps --no-header --pid=$PPID --format=cmd) != "fish" ]]
then
exec fish
fi
- Create and select a virtual enviornment
- Open a terminal
- first command that is run is source <python.venvpath>/bin/activate, which fails for fish.
(Setting the terminal.integrated.automationShell.linux variable does not change the result, but changing "terminal.integrated.shell.linux" fixes the issue). However, this breaks other parts of my setup.
Logs
Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)
User belongs to experiment group 'ShowPlayIcon - start'
User belongs to experiment group 'ShowExtensionSurveyPrompt - control'
User belongs to experiment group 'DebugAdapterFactory - experiment'
User belongs to experiment group 'PtvsdWheels37 - experiment'
User belongs to experiment group 'UseTerminalToGetActivatedEnvVars - control'
User belongs to experiment group 'LocalZMQKernel - control'
User belongs to experiment group 'CollectLSRequestTiming - control'
User belongs to experiment group 'CollectNodeLSRequestTiming - experiment'
User belongs to experiment group 'EnableIPyWidgets - experiment'
User belongs to experiment group 'RunByLine - control'
User belongs to experiment group 'CustomEditorSupport - control'
User belongs to experiment group 'pythonaacf'
conda --version
conda info --json
pyenv root
python3.7 ~/.vscode-oss/extensions/ms-python.python-2020.8.106424/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
python3.6 ~/.vscode-oss/extensions/ms-python.python-2020.8.106424/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
python2 ~/.vscode-oss/extensions/ms-python.python-2020.8.106424/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
python3 ~/.vscode-oss/extensions/ms-python.python-2020.8.106424/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
python ~/.vscode-oss/extensions/ms-python.python-2020.8.106424/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
~/.cache/pypoetry/virtualenvs/icons-egDUSKH7-py3.8/bin/python ~/.vscode-oss/extensions/ms-python.python-2020.8.106424/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
Error 2020-09-09 13:32:10: Failed to check if file needs to be fixed EntryNotFound (FileSystemError): Unable to read file '/home/otis/.config/Code/User/settings.json' (EntryNotFound (FileSystemError): Error: ENOENT: no such file or directory, open '/home/otis/.config/Code/User/settings.json')
at _handleError (/usr/lib/code/out/vs/workbench/services/extensions/node/extensionHostProcess.js:672:249)
at v.readText (/home/otis/.vscode-oss/extensions/ms-python.python-2020.8.106424/out/client/extension.js:1:495817)
at p.doesFileNeedToBeFixed (/home/otis/.vscode-oss/extensions/ms-python.python-2020.8.106424/out/client/extension.js:56:953520)
at /home/otis/.vscode-oss/extensions/ms-python.python-2020.8.106424/out/client/extension.js:56:952647
at async Promise.all (index 0)
at p.getFilesToBeFixed (/home/otis/.vscode-oss/extensions/ms-python.python-2020.8.106424/out/client/extension.js:56:952593)
at p.updateTestSettings (/home/otis/.vscode-oss/extensions/ms-python.python-2020.8.106424/out/client/extension.js:56:952220) {
code: 'FileNotFound',
name: 'EntryNotFound (FileSystemError)'
}
~/.cache/pypoetry/virtualenvs/icons-egDUSKH7-py3.8/bin/python ~/.vscode-oss/extensions/ms-python.python-2020.8.106424/pythonFiles/pyvsc-run-isolated.py -c "import notebook"
~/.cache/pypoetry/virtualenvs/icons-egDUSKH7-py3.8/bin/python ~/.vscode-oss/extensions/ms-python.python-2020.8.106424/pythonFiles/pyvsc-run-isolated.py -c "import jupyter"
Starting Microsoft Python language server.
Python interpreter path: ~/.cache/pypoetry/virtualenvs/icons-egDUSKH7-py3.8/bin/python
Error 2020-09-09 13:32:10: Failed to download and store experiments, Class name = b, completed in 2634ms, has a falsy return value, , Return Value: undefined Error: Failed with status 404, Not Found, Uri https://raw.githubusercontent.com/microsoft/vscode-python/master/experiments.json
at H._callback (/home/otis/.vscode-oss/extensions/ms-python.python-2020.8.106424/out/client/extension.js:54:713175)
at H.a._callback.a.callback.a.callback [as callback] (/home/otis/.vscode-oss/extensions/ms-python.python-2020.8.106424/out/client/node_modules/request.js:189:5442)
at H.emit (events.js:203:13)
at H. (/home/otis/.vscode-oss/extensions/ms-python.python-2020.8.106424/out/client/node_modules/request.js:189:18302)
at H.emit (events.js:203:13)
at IncomingMessage. (/home/otis/.vscode-oss/extensions/ms-python.python-2020.8.106424/out/client/node_modules/request.js:189:17134)
at Object.onceWrapper (events.js:291:20)
at IncomingMessage.emit (events.js:208:15)
at endReadableNT (_stream_readable.js:1168:12)
at processTicksAndRejections (internal/process/task_queues.js:77:11)
Error 2020-09-09 13:32:10: Failed to initialize experiments, Class name = b, completed in 2640ms, has a falsy return value, , Return Value: undefined Error: Failed with status 404, Not Found, Uri https://raw.githubusercontent.com/microsoft/vscode-python/master/experiments.json
at H._callback (/home/otis/.vscode-oss/extensions/ms-python.python-2020.8.106424/out/client/extension.js:54:713175)
at H.a._callback.a.callback.a.callback [as callback] (/home/otis/.vscode-oss/extensions/ms-python.python-2020.8.106424/out/client/node_modules/request.js:189:5442)
at H.emit (events.js:203:13)
at H. (/home/otis/.vscode-oss/extensions/ms-python.python-2020.8.106424/out/client/node_modules/request.js:189:18302)
at H.emit (events.js:203:13)
at IncomingMessage. (/home/otis/.vscode-oss/extensions/ms-python.python-2020.8.106424/out/client/node_modules/request.js:189:17134)
at Object.onceWrapper (events.js:291:20)
at IncomingMessage.emit (events.js:208:15)
at endReadableNT (_stream_readable.js:1168:12)
at processTicksAndRejections (internal/process/task_queues.js:77:11) {
vslsStack: [
CallSite {}, CallSite {},
CallSite {}, CallSite {},
CallSite {}, CallSite {},
CallSite {}, CallSite {},
CallSite {}, CallSite {}
]
}
conda --version
Environment data
python.languageServersetting: MircrosoftExpected behaviour
Opening a terminal automatically activates the selected virtual environment, by running
source <python.venvpath>/bin/activate.fish
Actual behaviour
Fish errors because it runs:
source <python.venvpath>/bin/activate
This is for bash shells
Steps to reproduce:
[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]
if [[ $(ps --no-header --pid=$PPID --format=cmd) != "fish" ]]
then
exec fish
fi
(Setting the terminal.integrated.automationShell.linux variable does not change the result, but changing "terminal.integrated.shell.linux" fixes the issue). However, this breaks other parts of my setup.
Logs
Output for
Pythonin theOutputpanel (View→Output, change the drop-down the upper-right of theOutputpanel toPython)User belongs to experiment group 'ShowPlayIcon - start'
User belongs to experiment group 'ShowExtensionSurveyPrompt - control'
User belongs to experiment group 'DebugAdapterFactory - experiment'
User belongs to experiment group 'PtvsdWheels37 - experiment'
User belongs to experiment group 'UseTerminalToGetActivatedEnvVars - control'
User belongs to experiment group 'LocalZMQKernel - control'
User belongs to experiment group 'CollectLSRequestTiming - control'
User belongs to experiment group 'CollectNodeLSRequestTiming - experiment'
User belongs to experiment group 'EnableIPyWidgets - experiment'
User belongs to experiment group 'RunByLine - control'
User belongs to experiment group 'CustomEditorSupport - control'
User belongs to experiment group 'pythonaacf'