Repository navigation
Closed
Labels
area-terminalbugIssue identified by VS Code Team member as probable bugneeds spikeLabel for issues that need investigation before they can be worked on.
Description
Environment data
- VS Code version: 1.39.2
- Extension version (available under the Extensions sidebar): 2019.11-dev
- OS and version: macOS Mojave
- Python version (& distribution if applicable, e.g. Anaconda): Python 3.7.5
- Type of virtual environment used (N/A | venv | virtualenv | conda | ...): venv
- Relevant/affected Python packages and their versions: N/A
- Jedi or Language Server? (i.e. what is
"python.jediEnabled"set to; more info How to update the language server to the latest stable version #3977): N/A
Using fish 3.0.2
Expected behaviour
To be able to have virtual environment activation succeed without errors.
Actual behaviour
Welcome to fish, the friendly interactive shell
(master *) > source /Users/brettcannon/Repositories/brettcannon/caniusepython3/.venv/bin/activate.fish
functions: Function '_old_fish_prompt' does not exist
~/Repositories/brettcannon/caniusepython3/.venv/bin/activate.fish (line 22):
functions -c _old_fish_prompt fish_prompt
^
in function 'deactivate'
called on line 30 of file ~/Repositories/brettcannon/caniusepython3/.venv/bin/activate.fish
with parameter list 'nondestructive'
from sourcing file ~/Repositories/brettcannon/caniusepython3/.venv/bin/activate.fish
called on standard input
functions - print or erase functions
Synopsis
functions [ -a | --all ] [ -n | --names ]
functions [ -D | --details ] [ -v ] FUNCTION
functions -c OLDNAME NEWNAME
functions -d DESCRIPTION FUNCTION
functions [ -e | -q ] FUNCTIONS...
functions: Type 'help functions' for related documentation
functions: Function 'fish_prompt' does not exist
~/Repositories/brettcannon/caniusepython3/.venv/bin/activate.fish (line 47):
functions -c fish_prompt _old_fish_prompt
^
from sourcing file ~/Repositories/brettcannon/caniusepython3/.venv/bin/activate.fish
called on standard input
functions - print or erase functions
Synopsis
functions [ -a | --all ] [ -n | --names ]
functions [ -D | --details ] [ -v ] FUNCTION
functions -c OLDNAME NEWNAME
functions -d DESCRIPTION FUNCTION
functions [ -e | -q ] FUNCTIONS...
functions: Type 'help functions' for related documentation
fish: Unknown command _old_fish_prompt
~/Repositories/brettcannon/caniusepython3/.venv/bin/activate.fish (line 71):
_old_fish_prompt
^
in function 'fish_prompt'
called on standard input
in command substitution
called on standard input
Steps to reproduce:
- Set
"terminal.integrated.inheritEnv": truein your settings - Create a virtual environment
- Set your shell to fish
- Open a new terminal that will trigger virtual environment activation
(You can also get the same effect by manually running source on activate.fish.)
Reacted by Irina Gossmann, Justin Cardinal, Wes, Joshua Bronson, Richard van Liessum U+2713, Wu Haotian, Priit Haamer, Teo Stocco, Evan Hawman and Arno Gobbin
Metadata
Metadata
Assignees
Labels
area-terminalbugIssue identified by VS Code Team member as probable bugneeds spikeLabel for issues that need investigation before they can be worked on.
Activity
ibqn commentedon Nov 6, 2019
I also have this error message.
TinyAtoms commentedon Nov 19, 2019
I'm going to continue our discussion here, since it's probably more relevant to your issue.
As I mentioned over there, I can get venv working with fish as well by manually activating
activate.fishhttps://i.imgur.com/gsoxznP.png in plain terminal
https://i.imgur.com/cYPf8gJ.png in vscode
Now I'm kinda curious why it doesn't work for you and not for me.
Maybe different fish setups?
Also, have you tried raising the issue at the fish-shell people? At a glance, there doesn't appear to be any open issues with venv/virtualenv, and this sounds a lot more like a fish problem than a vscode issue
brettcannon commentedon Nov 19, 2019
TinyAtoms nope, not raised it upstream yet since it is resolved by undoing an odd thing that VS Code does. But it wouldn't hurt either, so I will raised it upstream when I have the time.
sahilrajput03 commentedon Oct 23, 2020
idk what you are tryig actually but do check my issue with fish and vscode got resolved, and I'm happy.
microsoft/vscode#105344
Brett Cannon (@brettcannon)
brettcannon commentedon Dec 14, 2022
I haven't seen this issue crop up in some time, so I'm closing as fixed.