Skip to content
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

Reactivating Terminal #24642

Closed
Vinesh46-git opened this issue Dec 16, 2024 · 7 comments
Closed

Reactivating Terminal #24642

Vinesh46-git opened this issue Dec 16, 2024 · 7 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster triage-needed Needs assignment to the proper sub-team

Comments

@Vinesh46-git
Copy link

Type: Bug

There is something like the Reactivating Terminal it is showing because of which im not able to run the code in my terminal please resolve this issue ASAP!

VS Code version: Code 1.96.0 (138f619c86f1199955d53b4166bef66ef252935c, 2024-12-11T02:29:09.626Z)
OS version: Windows_NT x64 10.0.22631
Modes:

System Info
Item Value
CPUs Intel(R) Core(TM) i7-8665U CPU @ 1.90GHz (8 x 2112)
GPU Status 2d_canvas: enabled
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: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 15.81GB (3.59GB free)
Process Argv --crash-reporter-id 06a9d390-d75b-42b5-bf12-2fe9aab7d8a0
Screen Reader no
VM 0%
Extensions (9)
Extension Author (truncated) Version
rainbow-csv mec 3.13.0
debugpy ms- 2024.14.0
python ms- 2024.23.2024121301
vscode-pylance ms- 2024.12.1
jupyter ms- 2024.11.0
jupyter-keymap ms- 1.1.2
jupyter-renderers ms- 1.0.21
vscode-jupyter-cell-tags ms- 0.1.9
vscode-jupyter-slideshow ms- 0.1.6
A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805:30301674
binariesv615:30325510
vsaa593cf:30376535
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
962ge761:30959799
pythonnoceb:30805159
pythonmypyd1:30879173
h48ei257:31000450
pythontbext0:30879054
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
dsvsc021:30996838
dvdeprecation:31068756
dwnewjupytercf:31046870
nativerepl1:31139838
pythonrstrctxt:31112756
nativeloc1:31192215
cf971741:31144450
iacca1:31171482
notype1cf:31157160
5fd0e150:31155592
dwcopilot:31170013
stablechunks:31184530
6074i472:31201624

@Tyriar
Copy link
Member

Tyriar commented Dec 16, 2024

I don't understand what you mean, could you provide more information/screenshots/gifs?

@Tyriar Tyriar added the ~info-needed Issue requires more information from poster (with bot comment) label Dec 16, 2024
Copy link

Thanks for creating this issue! We figured it's missing some basic information or in some other way doesn't follow our issue reporting guidelines. Please take the time to review these and update the issue.

Happy Coding!

@vs-code-engineering vs-code-engineering bot added info-needed Issue requires more information from poster and removed ~info-needed Issue requires more information from poster (with bot comment) labels Dec 16, 2024
@ReetiMauryaCrest
Copy link

ReetiMauryaCrest commented Dec 19, 2024

@Tyriar I don't know if this is mentioning the same issue I am having but I am commenting over here first to avoid making a new issue if it already exists.

I have started getting issues in my terminal after installing latest updates. It is now not detecting my python environment properly, so I need to run venv activate command manually for it to start working. I am able to see the venv activated in my terminal whenever I create new command prompt terminal, but it is not actually getting the venv enviornment so shows error in the terminal if I run any command, so I have to run the activate command manually and it starts working after that.

Here is an example

Microsoft Windows [Version 10.0.22631.4460]
(c) Microsoft Corporation. All rights reserved.

(venv) D:\Projects\Python\my_project>python manage.py runserver
Traceback (most recent call last):
  File "D:\Projects\Python\my_project\manage.py", line 11, in main
    from django.core.management import execute_from_command_line
ModuleNotFoundError: No module named 'django'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "D:\Projects\Python\my_project\manage.py", line 22, in <module>
    main()
  File "D:\Projects\Python\my_project\manage.py", line 13, in main
    raise ImportError(
ImportError: Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you forget to activate a virtual environment?

(venv) D:\Projects\Python\my_project>venv\Scripts\activate 

(venv) D:\Projects\Python\my_project>python manage.py runserver
Watching for file changes with StatReloader
Performing system checks...
.....

@Tyriar Tyriar assigned karthiknadig and unassigned Tyriar Dec 19, 2024
@Tyriar Tyriar added python Pull requests that update Python code and removed info-needed Issue requires more information from poster labels Dec 19, 2024
@karthiknadig karthiknadig removed their assignment Dec 19, 2024
@karthiknadig karthiknadig removed the python Pull requests that update Python code label Dec 19, 2024
@karthiknadig karthiknadig transferred this issue from microsoft/vscode Dec 19, 2024
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Dec 19, 2024
@karthiknadig
Copy link
Member

Add this to your User settings, and then reload VS Code:

"python.experiments.optOutFrom": ["pythonTerminalEnvVarActivation"]

Another thing you can try is to run Python: Clear Cache and Reload command. Also, make sure you are on the latest pre-release version of the python extension.

@karthiknadig karthiknadig self-assigned this Dec 19, 2024
@github-actions github-actions bot added the info-needed Issue requires more information from poster label Dec 19, 2024
@karthiknadig karthiknadig added the bug Issue identified by VS Code Team member as probable bug label Dec 19, 2024
@karthiknadig karthiknadig marked this as a duplicate of #24638 Dec 19, 2024
@ReetiMauryaCrest
Copy link

@karthiknadig doesn't this just stops the automatic activation of virtual environment?

"python.experiments.optOutFrom": ["pythonTerminalEnvVarActivation"]

This one worked for me, thank you.

make sure you are on the latest pre-release version of the python extension.

@ReetiMauryaCrest
Copy link

Okay, after installing the new updates that came today I can go back to release version of python instead of pre-release and it still works. I don't know if its because of the new updates or because I switched back and forth in the extension leading to something like this being executed in background.

Python: Clear Cache and Reload command

Anyways, its started working and that's all I needed.

@karthiknadig
Copy link
Member

doesn't this just stops the automatic activation of virtual environment?

Auto activation is controlled by these settings:
Image

The thing you disabled is an experiment that tries to do activation in a different way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster triage-needed Needs assignment to the proper sub-team
Projects
None yet
Development

No branches or pull requests

4 participants