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

Pylance crashing once open Jupyter notebook #6933

Closed
micatske opened this issue Feb 8, 2025 · 4 comments
Closed

Pylance crashing once open Jupyter notebook #6933

micatske opened this issue Feb 8, 2025 · 4 comments
Assignees
Labels
needs repro Issue has not been reproduced yet user responded Was "waiting for user response" and they responded

Comments

@micatske
Copy link

micatske commented Feb 8, 2025

Environment data

  • Pylance version: 2025.2.1
  • OS and version: Pop OS 22.04
  • Python version (& distribution if applicable, e.g. Anaconda): Python 3.11.5 conda 24.3.0
  • VScode version : 1.97.0'
  • Jupyter: 2025.1.0

Code Snippet

XXX

Repro Steps

Expected behavior

Pylance Crashing

Actual behavior

Pylance has crashed 5 times in the last 3 minutes. Pylance will not be restarted. Please check this link for more details.

Logs

2025-02-08 10:21:52.366 [info] Error: Request workspace/configuration failed with message: Cannot create property 'pythonPath' on string 'python -u'
    at aI (/home/micatske/.vscode/extensions/ms-python.vscode-pylance-2025.2.1/dist/vendor.bundle.js:2:1461022)
    at ZI (/home/micatske/.vscode/extensions/ms-python.vscode-pylance-2025.2.1/dist/vendor.bundle.js:2:1459180)
    at Immediate.<anonymous> (/home/micatske/.vscode/extensions/ms-python.vscode-pylance-2025.2.1/dist/vendor.bundle.js:2:1455466)
    at processImmediate (node:internal/timers:483:21)

2025-02-08 10:21:52.401 [info] [Error - 10:21:52 AM] Server process exited with code 1.
2025-02-08 10:21:52.404 [info] [Info  - 10:21:52 AM] Connection to server got closed. Server will restart.
2025-02-08 10:21:52.404 [info] true
2025-02-08 10:21:52.799 [info] [Info  - 10:21:52 AM] (60304) Server root directory: file:///home/micatske/.vscode/extensions/ms-python.vscode-pylance-2025.2.1/dist
2025-02-08 10:21:52.800 [info] [Info  - 10:21:52 AM] (60304) Pylance language server 2025.2.1 (pyright version 1.1.393, commit 3763156f) starting
2025-02-08 10:21:52.802 [info] [Info  - 10:21:52 AM] (60304) Starting service instance "Electric Price"
2025-02-08 10:21:52.847 [info] 
@github-actions github-actions bot added the needs repro Issue has not been reproduced yet label Feb 8, 2025
@rchiodo
Copy link
Contributor

rchiodo commented Feb 10, 2025

My guess is that the interpreter path has arguments somehow embedded in it. What's your python.defaultInterpreterPath?

@rchiodo
Copy link
Contributor

rchiodo commented Feb 10, 2025

@StellaHuang95 I'm guessing we're crashing right here:
https://github.com/microsoft/pyrx/blob/e4ee5ab77f8896dc8bb389fc8c803a323c620431/packages/pylance-internal/src/server/common.ts#L653

Which means the settings.json from the user is breaking us somehow.

Actually @micatske if you could include your entire 'settings.json', that would help diagnose the issue.

@rchiodo rchiodo added the waiting for user response Requires more information from user label Feb 10, 2025
@github-actions github-actions bot added user responded Was "waiting for user response" and they responded and removed waiting for user response Requires more information from user labels Feb 10, 2025
@rchiodo
Copy link
Contributor

rchiodo commented Feb 10, 2025

This line right here is breaking it:

"python": "python -u",

Not sure what that's for? Maybe another extension?

@micatske
Copy link
Author

Thanks! Now the issue is fixed. That's a weird line

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs repro Issue has not been reproduced yet user responded Was "waiting for user response" and they responded
Projects
None yet
Development

No branches or pull requests

3 participants