You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pylance is set up in a way it can support both packages and scripts at edit time and that's why from array.core and from core both are resolved. and we expect users to set python search path properly in launch.json so import statement is resolved property under debugger.
in your case, it looks like you are trying to run a python file as a script and not from the debugger but from terminal, in that case, if you want from array.core to work, then you need to put manning_datastructure folder in sys.path
you can add it through PYTHONPATH env variable, or you can do that in code with something like sys.path.append(os.getcwd()) assuming you are running the code from manning_datstructure folder.
or you could set sys.path based on current script's location (__file__)
or you could use python -m array to run it as a module.
if you are using debugger and run it as a script, you can set this
"env": {
"PYTHONPATH": "${workspaceFolder}"
}
assuming your workspace root is manning_datastructure.
anyway, all that said, I believe pylance is working as expected.
Uh oh!
There was an error while loading. Please reload this page.
Type: Bug
see attached gif. I have attached files, which i used

files.zip
Extension version: 2024.6.0
VS Code version: Code 1.89.0 (b58957e67ee1e712cebf466b995adf4c5307b2bd, 2024-05-01T02:08:25.066Z)
OS version: Linux x64 5.15.0-105-generic
Modes:
System Info
canvas_oop_rasterization: disabled_off
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: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
A/B Experiments
The text was updated successfully, but these errors were encountered: