-
Notifications
You must be signed in to change notification settings - Fork 29.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New Terminal output adding spaces and % resulting in cut off when activating Python environments (venv) #192018
Comments
@meganrogge We simply send the command |
|
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
Regarding the main issue in hand, it can be confirmed from the logs indicate that Python sent the right command in terminal, so transferring this issue to VS Code as indicated here: #192018 (comment). |
thank you; I will check |
This is happening because you're using sendText before the shell is initialized. The only way to fix this is via a timeout (which is unreliable) or via a yet to come executeCommand API. The % stuff is just that messing up zsh's standup startup |
FWIW we do wait on terminal to open: Regardless, this issue should not be happening with microsoft/vscode-python#11039, closing this. |
Does this issue occur when all extensions are disabled?: Yes/No
Yes (only Python/Pylance installed since needed)
Steps to Reproduce:
Open Command Palette --> Python: Create Environment --> Venv --> Python (I chose Python 3.10.12 64-bit) --> requirements.txt (leave unchecked) click OK
Now create a new terminal; this is the strange part.. Sometimes it will add a % and a whole bunch of spaces when "activating" the environment.. look at the line with
source
..the_slim_fatty_p% rod/.venv/bin/activate
That is actually a bunch of spaces. Right click the Terminal window and "Toggle Size to Content Width" to see.
Sometimes creating a new terminal does not do this behavior and no spaces are added and that weird %.
This happens on new machines too. New projects from scratch. Python and macOS only tested.
Very random behavior; quickest way to test is click the plus icon on the bottom right to open new terminals so it activates in rapid succession and most of the time it actually does not add the spaces to the output. But every 4 or 5 clicks it does.. I have no idea.
CORRECT BEHAVIOR:
INCORRECT BEHAVIOR:
Tasks
The text was updated successfully, but these errors were encountered: