Skip to content

Python command is not getting understand in VS code #25221

@Tanuja100

Description

@Tanuja100

Type: Bug

Image

Behaviour

XXX
Just writting this code in .py file and I am getting the following error .

My code :
for x in range(10):
print(x)

Python terminal error :
Traceback (most recent call last):
File "", line 1, in
NameError: name 'x' is not defined

Steps to reproduce:

  1. XXX

Diagnostic data

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

XXX

Behaviour

XXX

Steps to reproduce:

  1. XXX

Diagnostic data

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

XXX

Extension version: 2024.14.0
VS Code version: Code 1.89.1 (dc96b837cf6bb4af9cd736aa3af08cf8279f7685, 2024-05-07T05:13:33.891Z)
OS version: Windows_NT x64 10.0.26100
Modes:

  • Python version (& distribution if applicable, e.g. Anaconda): 3.11.3
  • Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Global
  • Value of the python.languageServer setting: Default
User Settings


languageServer: "Jedi"

Installed Extensions
Extension Name Extension Id Version
django-intellisense shamanu4.django-intellisense 0.0.2
JavaScript Debugger ms-vscode.js-debug 1.89.0
JavaScript Debugger Companion Extension ms-vscode.js-debug-companion 1.1.2
Path Intellisense christian-kohler.path-intellisense 2.10.0
Python ms-python.python 2024.14.0
Python Debugger ms-python.debugpy 2024.8.0
Table Visualizer for JavaScript Profiles ms-vscode.vscode-js-profile-table 1.0.9
System Info
Item Value
CPUs 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz (8 x 2419)
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
Load (avg) undefined
Memory (System) 15.69GB (3.82GB free)
Process Argv --crash-reporter-id 46d2d85e-33cc-4898-95a6-85a463dba367
Screen Reader no
VM 0%
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805cf:30301675
binariesv615:30325510
c4g48928:30535728
azure-dev_surveyone:30548225
962ge761:30959799
h48ei257:31000450
pythontbext0:30879054
cppperfnew:31000557
dwnewjupyter:31046869
pythonrstrctxt:31112756
nativeloc2:31192216
5fd0e150:31155592
dwcopilot:31170013
6074i472:31201624
dwoutputs:31242946
customenabled:31248079
hdaa2157:31222309
copilot_t_ci:31333650
pythoneinst12:31285622
bgtreat:31268568
4gafe986:31271826
c7cif404:31314491
pythonpulldiag:31335739
996jf627:31283433
pythonrdcb7:31303018
usemplatestapi:31297334
0aa6g176:31307128
7bj51361:31289155
aj953862:31281341
generatesymbolt:31295002
convertfstringf:31295003
convertlamdaf:31329270
c4b42873:31332228
d7aab740:31337162
usemarketplace:31336439
nes-diff-11:31337487
testaa123cf:31335227
6abeh943:31336334
yijiwantestdri0626-c:31336931
nes-varabove-0:31337527

Metadata

Metadata

Assignees

Labels

info-neededIssue requires more information from postertriage-neededNeeds assignment to the proper sub-team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions