Skip to content

GetInterpreterDetails no longer returning sys.prefix #16355

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

Closed
DonJayamanne opened this issue Jun 1, 2021 · 2 comments · Fixed by #16386
Closed

GetInterpreterDetails no longer returning sys.prefix #16355

DonJayamanne opened this issue Jun 1, 2021 · 2 comments · Fixed by #16386
Assignees
Labels
area-environments Features relating to handling interpreter environments bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority

Comments

@DonJayamanne
Copy link

Environment data

  • VS Code version: Insiders
  • Extension version (available under the Extensions sidebar): 2021.6.894226714-dev
  • OS and version: Mac
  • Python version (& distribution if applicable, e.g. Anaconda): 3.8
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): Virtual Env
  • Relevant/affected Python packages and their versions: n/a
  • Relevant/affected Python-related VS Code extensions and their versions: n/a
  • Value of the python.languageServer setting: n/a

[NOTE: If you suspect that your issue is related to the Microsoft Python Language Server (python.languageServer: 'Microsoft'), please download our new language server Pylance from the VS Code marketplace to see if that fixes your issue]

Experiments

User belongs to experiment group 'pythonaacf'
User belongs to experiment group 'pythonJediLSP'
User belongs to experiment group 'pythonDiscoveryModuleWithoutWatcher'
User belongs to experiment group 'pythonTensorboardExperiment'
User belongs to experiment group 'PythonPyTorchProfiler'
User belongs to experiment group 'CollectLSRequestTiming - control'
User belongs to experiment group 'CollectNodeLSRequestTiming - experiment'

The API used by Jupyter extension ends up with sys.prefix being empty.

@DonJayamanne DonJayamanne added bug Issue identified by VS Code Team member as probable bug triage-needed Needs assignment to the proper sub-team labels Jun 1, 2021
@DonJayamanne
Copy link
Author

@karthiknadig /cc

@karthiknadig karthiknadig self-assigned this Jun 1, 2021
@karthiknadig karthiknadig added needs spike Label for issues that need investigation before they can be worked on. area-environments Features relating to handling interpreter environments important Issue identified as high-priority and removed triage-needed Needs assignment to the proper sub-team labels Jun 1, 2021
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Jun 1, 2021
@karthiknadig
Copy link
Member

@karrtikr This seems to be an issue with caching. essentially doResolveEnv in CachingLocator gets entries from cache if it can find a match. The problem is that when the cache is loaded the first time it might not have executed the interpreter info script. So the cache content might actually be incomplete, since we pulled from cache, we do not run resolve on that environment or attempt to see if it needs to be refreshed.

As we had discussed offline, we need a better way to determine if the cache information is outdated or incomplete. In those cases we should continue to run full resolution.

We can provide a short-term solution here while we address the issues with caching locator.

@karthiknadig karthiknadig added needs PR and removed triage-needed Needs assignment to the proper sub-team needs spike Label for issues that need investigation before they can be worked on. labels Jun 1, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-environments Features relating to handling interpreter environments bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants