Skip to content

Does not import modules. Python. #239435

@KillaNerm

Description

@KillaNerm

Type: Bug

D:\Python\tester
-onee - folder
---ones.py
-twoo - folder
---twos.py

When importing a simple variable, function or anything from one to two, or vice versa, an error occurs:
Exception has occurred: ModuleNotFoundError
No module named 'twoo
' File "D:\Python\tester\onee\ones.py", line 1, in
from twoo.twos import x
ModuleNotFoundError: No module named “twoo”.

It has appeared recently. rather, there were no such problems.
That is, at one point this error began to appear.
if the file to which the import is performed is not in the root folder.

Everything works in PyCharm.

Translated with DeepL.com (free version)

VS Code version: Code 1.96.4 (cd4ee3b, 2025-01-16T00:16:19.038Z)
OS version: Windows_NT x64 10.0.22631
Modes:

System Info
Item Value
CPUs 11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz (16 x 2304)
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.78GB (3.53GB free)
Process Argv
Screen Reader no
VM 0%
Extensions (3)
Extension Author (truncated) Version
debugpy ms- 2024.14.0
python ms- 2024.22.2
vscode-pylance ms- 2024.12.1
A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492:30256859
vscod805cf:30301675
binariesv615:30325510
vsaa593cf:30376535
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
962ge761:30959799
pythonnoceb:30805159
pythonmypyd1:30879173
2e7ec940:31000449
pythontbext0:30879054
cppperfnew:31000557
dwnewjupyter:31046869
nativerepl2:31139839
pythonrstrctxt:31112756
nativeloc2:31192216
iacca1:31171482
5fd0e150:31155592
dwcopilot:31170013
stablechunks:31184530
6074i472:31201624
dwoutputs:31217127
hdaa2157:31222309
copilot_t_ci:31222730

Image

Image

Metadata

Metadata

Assignees

Labels

*caused-by-extensionIssue identified to be caused by an extension

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions