Skip to content

Pylance crash at making .env directory #994

Description

Type: Bug

  1. create .env directory at workspace root directory
  2. pylance crash

Extension version: 2025.6.2
VS Code version: Code 1.102.2 (c306e94f98122556ca081f527b466015e1bc37b0, 2025-07-22T12:15:48.520Z)
OS version: Windows_NT x64 10.0.26100
Modes:
Remote OS version: Linux x64 6.6.87.2-microsoft-standard-WSL2

System Info
Item Value
CPUs Intel(R) Core(TM) Ultra 7 258V (8 x 3302)
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) 31.48GB (14.69GB free)
Process Argv --crash-reporter-id 4e12de09-1c36-4df4-895b-e1198926e9b2
Screen Reader no
VM 0%
Item Value
Remote WSL: Ubuntu
OS Linux x64 6.6.87.2-microsoft-standard-WSL2
CPUs Intel(R) Core(TM) Ultra 7 258V (8 x 0)
Memory (System) 15.36GB (13.73GB free)
VM 0%
A/B Experiments
vsliv368cf:30146710
vswsl492cf:30256860
binariesv615:30325510
2e7ec940:31000449
nativeloc1:31344060
dwcopilot:31170013
6074i472:31201624
dwoutputs:31242946
9064b325:31222308
copilot_t_ci:31333650
e5gg6876:31282496
pythoneinst12:31285622
c7cif404:31314491
pythonpulldiag:31343502
996jf627:31283433
pythonrdcb7:31342333
usemplatestapi:31297334
0aa6g176:31307128
747dc170:31275177
aj953862:31281341
generatesymbolt:31295002
convertfstringf:31295003
pylancequickfixt:31350061
9d2cg352:31346308
usemarketplace:31343026
nesew2to5:31336538
agentclaude:31350858
4f60g487:31327383
nes-diff-11:31337487
replacestringexc:31350595
nes-set-on:31351930
testaa123:31335226
6abeh943:31336334
envsactivate1:31353494
yijiwantestdri0626-c:31336931
0927b901:31350571
4gdec884:31348710
0cj2b977:31352657

Activity

  1. github-actions commented on Jul 24, 2025

    @github-actions
  2. debonte commented on Jul 24, 2025

    @debonte

    あいうえお (@aiueo-1234), I wasn't able to reproduce this with the instructions you provided above. Are you able to reproduce this issue on demand? If so, can you please reproduce it and then provide the contents of your "Python Language Server" log from the VS Code Output tab?

    I'd also be curious to know if setting python.useEnvironmentsExtension to false fixes the behavior you are seeing.

  3. aiueo-1234 commented on Jul 25, 2025

    @aiueo-1234
    Author

    Erik De Bonte (@debonte)

    Yes, I can do that. "Python Language Server" log is below.

    2025-07-25 15:09:48.307 [info] Error: Request workspace/configuration failed with message: Error: EISDIR: illegal operation on a directory, read
        at bI (/home/aiueo-1234/.vscode-server/extensions/ms-python.vscode-pylance-2025.6.2/dist/vendor.bundle.js:2:1744971)
        at sI (/home/aiueo-1234/.vscode-server/extensions/ms-python.vscode-pylance-2025.6.2/dist/vendor.bundle.js:2:1743129)
        at Immediate.<anonymous> (/home/aiueo-1234/.vscode-server/extensions/ms-python.vscode-pylance-2025.6.2/dist/vendor.bundle.js:2:1739415)
        at processImmediate (node:internal/timers:485:21)
    
    2025-07-25 15:09:48.452 [info] [Error - 3:09:48 PM] Server process exited with code 1.
    2025-07-25 15:09:48.455 [info] [Error - 3:09:48 PM] Pylance has crashed 5 times in the last 3 minutes. Pylance will not be restarted. Please check [this link](https://aka.ms/AApf7ox) for more details.
    

    Also, as you said, if I set python.useEnvironmentsExtension to false, the error no longer occurs.

  4. debonte commented on Jul 25, 2025

    @debonte

    Eleanor Boyd (@eleanorjboyd), FYI. I'm not sure if this should be transferred to https://github.com/microsoft/vscode-python-environments, or if this is a Pylance issue.

  5. eleanorjboyd commented on Nov 14, 2025

    @eleanorjboyd
    Member

    transferring now as behavior changes with changes to the setting. あいうえお (@aiueo-1234) are you still facing problems? We have upgraded a lot of behavior on the extension since this point in July. Let me know and I can investigate further if you are still having problems!

  6. aiueo-1234 commented on Nov 17, 2025

    @aiueo-1234
    Author

    I have now confirmed that this issue no longer occurs if I set python.useEnvironmentsExtension to true. Thank you.

  7. locked as resolved and limited conversation to collaborators on Apr 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue identified by VS Code Team member as probable bugtriage-needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions