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

Cannot display Python environment after selecting Trust Folder. #24444

Open
ttSpace opened this issue Nov 14, 2024 · 3 comments
Open

Cannot display Python environment after selecting Trust Folder. #24444

ttSpace opened this issue Nov 14, 2024 · 3 comments
Assignees
Labels
triage-needed Needs assignment to the proper sub-team

Comments

@ttSpace
Copy link

ttSpace commented Nov 14, 2024

Environment data

Build of Visual Studio Code - Insiders: 1.96.0-insider
Build of python-insider: 2024.21.2024111301
Build of pylance-insider: 2024.11.100

Code Snippet

x = "str

Repro Steps

  1. Create a new directory somewhere on disk

  2. Open VS Code

  3. Open that new directory via File > Open Folder...

  4. Create a new Jupyter notebook

  5. Add the following to one of the cells. You should see an error squiggle under "str because the trailing quotes are missing:
    x = "str

  6. Save the notebook in the directory.

  7. Run "Workspaces: Manage Workspace Trust" via the command palette

  8. Press the "Don't Trust" button

  9. In the pop-up window, select Trust Folder & Continue.

Expected behavior

The python environment is loaded and displayed normally.

Actual behavior

The python environment cannot be displayed normally.

Image

Logs

Output for Python Language Server in the Output panel

2024-11-14 09:41:27.217 [info] (Client) Pylance async client (2024.11.100) started with python extension (2024.21.2024111301)
2024-11-14 09:41:28.510 [info] [Info  - 9:41:28 AM] (5652) Server root directory: file:///c%3A/Users/vting/.vscode-insiders/extensions/ms-python.vscode-pylance-2024.11.100/dist
2024-11-14 09:41:28.511 [info] [Info  - 9:41:28 AM] (5652) Pylance language server 2024.11.100 (pyright version 1.1.388, commit 7a829a4e) starting
2024-11-14 09:41:28.511 [info] [Info  - 9:41:28 AM] (5652) Starting service instance "Folder"
2024-11-14 09:41:28.552 [info] [Info  - 9:41:28 AM] (5652) Setting environmentName for service "Folder": "3.11.9 (global)"
2024-11-14 09:41:28.552 [info] [Info  - 9:41:28 AM] (5652) Setting pythonPath for service "Folder": "C:\Python311\python.exe"
2024-11-14 09:41:28.553 [info] [Info  - 9:41:28 AM] (5652) No include entries specified; assuming c:\Users\vting\Desktop\Folder
2024-11-14 09:41:28.553 [info] [Info  - 9:41:28 AM] (5652) Auto-excluding **/node_modules
2024-11-14 09:41:28.554 [info] [Info  - 9:41:28 AM] (5652) Auto-excluding **/__pycache__
2024-11-14 09:41:28.554 [info] [Info  - 9:41:28 AM] (5652) Auto-excluding **/.*
2024-11-14 09:41:28.621 [info] [Info  - 9:41:28 AM] (5652) Assuming Python version 3.11.9.final.0
2024-11-14 09:41:28.769 [info] [Info  - 9:41:28 AM] (5652) No source files found.
2024-11-14 09:41:29.225 [info] [Info  - 9:41:29 AM] (5652) Background analysis(1) root directory: file:///c%3A/Users/vting/.vscode-insiders/extensions/ms-python.vscode-pylance-2024.11.100/dist
2024-11-14 09:41:29.228 [info] [Info  - 9:41:29 AM] (5652) Background analysis(1) started
2024-11-14 09:41:29.399 [info] [Info  - 9:41:29 AM] (5652) Indexer background runner(2) root directory: file:///c%3A/Users/vting/.vscode-insiders/extensions/ms-python.vscode-pylance-2024.11.100/dist (index)
2024-11-14 09:41:29.399 [info] [Info  - 9:41:29 AM] (5652) Indexing(2) started
2024-11-14 09:41:30.136 [info] [Info  - 9:41:30 AM] (5652) scanned(2) 22 files over 1 exec env
2024-11-14 09:41:30.776 [info] [Info  - 9:41:30 AM] (5652) indexed(2) 22 files over 1 exec env
2024-11-14 09:41:30.800 [info] [Info  - 9:41:30 AM] (5652) Indexing finished(2).
2024-11-14 09:41:43.561 [info] (Client) Pylance async client (2024.11.100) started with python extension (2024.21.2024111301)
2024-11-14 09:41:44.111 [info] [Info  - 9:41:44 AM] (6028) Server root directory: file:///c%3A/Users/vting/.vscode-insiders/extensions/ms-python.vscode-pylance-2024.11.100/dist
2024-11-14 09:41:44.112 [info] [Info  - 9:41:44 AM] (6028) Pylance language server 2024.11.100 (pyright version 1.1.388, commit 7a829a4e) starting
2024-11-14 09:41:44.112 [info] [Info  - 9:41:44 AM] (6028) Starting service instance "Folder"
2024-11-14 09:41:44.160 [info] [Info  - 9:41:44 AM] (6028) No include entries specified; assuming c:\Users\vting\Desktop\Folder
2024-11-14 09:41:44.160 [info] [Info  - 9:41:44 AM] (6028) Auto-excluding **/node_modules
2024-11-14 09:41:44.160 [info] [Info  - 9:41:44 AM] (6028) Auto-excluding **/__pycache__
2024-11-14 09:41:44.161 [info] [Info  - 9:41:44 AM] (6028) Auto-excluding **/.*
2024-11-14 09:41:44.210 [info] [Info  - 9:41:44 AM] (6028) No source files found.
2024-11-14 09:41:44.213 [info] [Info  - 9:41:44 AM] (6028) Starting service instance "Folder"
2024-11-14 09:41:44.224 [info] [Info  - 9:41:44 AM] (6028) Setting pythonPath for service "Folder": "c:\Users\vting\Desktop\Folder"
2024-11-14 09:41:44.225 [info] [Info  - 9:41:44 AM] (6028) No include entries specified; assuming c:\Users\vting\Desktop\Folder
2024-11-14 09:41:44.225 [info] [Info  - 9:41:44 AM] (6028) Auto-excluding **/node_modules
2024-11-14 09:41:44.225 [info] [Info  - 9:41:44 AM] (6028) Auto-excluding **/__pycache__
2024-11-14 09:41:44.225 [info] [Info  - 9:41:44 AM] (6028) Auto-excluding **/.*
2024-11-14 09:41:44.258 [info] [Info  - 9:41:44 AM] (6028) No source files found.
2024-11-14 09:41:44.749 [info] [Info  - 9:41:44 AM] (6028) Background analysis(1) root directory: file:///c%3A/Users/vting/.vscode-insiders/extensions/ms-python.vscode-pylance-2024.11.100/dist
2024-11-14 09:41:44.751 [info] [Info  - 9:41:44 AM] (6028) Background analysis(1) started
2024-11-14 09:41:44.836 [info] [Info  - 9:41:44 AM] (6028) Background analysis(2) root directory: file:///c%3A/Users/vting/.vscode-insiders/extensions/ms-python.vscode-pylance-2024.11.100/dist
2024-11-14 09:41:44.838 [info] [Info  - 9:41:44 AM] (6028) Background analysis(2) started

@rchiodo
Copy link

rchiodo commented Nov 14, 2024

This would be a bug in the Python extension. It controls environment selection.

@rchiodo rchiodo transferred this issue from microsoft/pylance-release Nov 14, 2024
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Nov 14, 2024
@karthiknadig karthiknadig self-assigned this Nov 18, 2024
@karthiknadig
Copy link
Member

@ttSpace Does reloading after trust status change help with this?

@github-actions github-actions bot added the info-needed Issue requires more information from poster label Nov 19, 2024
@ttSpace
Copy link
Author

ttSpace commented Nov 19, 2024

@karthiknadig After reloading, the Python environment was displayed as expected.

Image

BuildInfo

Build of Visual Studio Code - Insiders: 1.96.0-insider
Build of python-insider: 2024.21.2024111501
Build of pylance-insider: 2024.11.100

@github-actions github-actions bot removed the info-needed Issue requires more information from poster label Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage-needed Needs assignment to the proper sub-team
Projects
None yet
Development

No branches or pull requests

4 participants