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

Conflict with pylance syntax highlighting and code completion #4724

Closed
1 of 2 tasks
Koowah opened this issue Aug 10, 2023 · 9 comments
Closed
1 of 2 tasks

Conflict with pylance syntax highlighting and code completion #4724

Koowah opened this issue Aug 10, 2023 · 9 comments
Assignees
Labels
duplicate This issue or pull request already exists

Comments

@Koowah
Copy link

Koowah commented Aug 10, 2023

Applies To

  • Notebooks (.ipynb files)
  • Interactive Window and/or Cell Scripts (.py files with #%% markers)

What happened?

Pylance syntax highlighting works at first before giving way to jupyter syntax highlighting after a few seconds (20/30) at which point code completion stops working aswell.
Any idea why this might be ? This started fairly recently.

Thanks for your help 😄

VS Code Version

Version: 1.81.0 (user setup) Commit: 6445d93c81ebe42c4cbd7a60712e0b17d9463e97 Date: 2023-08-02T12:37:13.485Z Electron: 22.3.18 ElectronBuildId: 22689846 Chromium: 108.0.5359.215 Node.js: 16.17.1 V8: 10.8.168.25-electron.0 OS: Windows_NT x64 10.0.19045

Jupyter Extension Version

v2023.7.1002162226

Jupyter logs

No response

Coding Language and Runtime Version

Python 3.11.4

Language Extension Version (if applicable)

v2023.14.0

Anaconda Version (if applicable)

23.5.2

Running Jupyter locally or remotely?

Local

@Koowah Koowah added the bug Something isn't working label Aug 10, 2023
@Koowah Koowah changed the title Conflict with pylance syntax highlighting Conflict with pylance syntax highlighting and code completion Aug 10, 2023
@debonte debonte transferred this issue from microsoft/vscode-jupyter Aug 15, 2023
@github-actions github-actions bot added the needs repro Issue has not been reproduced yet label Aug 15, 2023
@Koowah
Copy link
Author

Koowah commented Aug 17, 2023

Please let me know if there are any type of logs I can provide to help with your task 😃

@debonte
Copy link
Contributor

debonte commented Aug 17, 2023

Can you please provide a log as described under "Filing an issue" in the troubleshooting guide?

You might be hitting #4685.

@debonte debonte added the waiting for user response Requires more information from user label Aug 17, 2023
@Koowah
Copy link
Author

Koowah commented Aug 21, 2023

Can you please provide a log as described under "Filing an issue" in the troubleshooting guide?

You might be hitting #4685.

@debonte
Hi Erik,
I think you hit the nail on the head, after playing with my notebook it appears to be #4685 .

Please find the logs attached : to obtain them i reloaded the dev window, ran all the notebook's cells, added one, ran it and deleted it. On deletion, the syntax highlighting did in fact stop working.

pylogs.txt

@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 Aug 21, 2023
@debonte
Copy link
Contributor

debonte commented Aug 23, 2023

It's possible that this behavior was caused by #4733 which is fixed in our latest prerelease build, 2023.8.41

Could you please all to 2023.8.41 and see if your issues are resolved?

@StellaHuang95 StellaHuang95 added waiting for user response Requires more information from user and removed bug Something isn't working user responded Was "waiting for user response" and they responded needs repro Issue has not been reproduced yet labels Aug 24, 2023
@debonte
Copy link
Contributor

debonte commented Aug 26, 2023

@Koowah, when you see this issue, if you add/delete/reorder a cell, do you see Pylance crash with an error similar to this?

2023-08-26 09:07:01.700 [info] Error: Debug Failure. False expression: Chained file path undefined doesn't match cellFilePaths c:\temp\temp\4685repro_3\test.ipynb:pylance-notebook-cell:W3sZmlsZQ==.py
    at _0x35bbe7 (c:\Users\erikd\.vscode-insiders\extensions\ms-python.vscode-pylance-2023.8.41\dist\server.bundle.js:1:1025282)
    at c:\Users\erikd\.vscode-insiders\extensions\ms-python.vscode-pylance-2023.8.41\dist\server.bundle.js:1:1032550
    at _0x114e49.<computed> (c:\Users\erikd\.vscode-insiders\extensions\ms-python.vscode-pylance-2023.8.41\dist\server.bundle.js:1:1032582)
    at _0x4600bc._onDidChangeNotebookDocumentAsync (c:\Users\erikd\.vscode-insiders\extensions\ms-python.vscode-pylance-2023.8.41\dist\server.bundle.js:1:1010710)

@Koowah
Copy link
Author

Koowah commented Aug 27, 2023

@debonte Pylance works fine when adding or reordering cells. The issue only happens on cell deletion. There is however no error message in the output tab.

@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 Aug 27, 2023
@debonte
Copy link
Contributor

debonte commented Aug 27, 2023

Pylance works fine when adding or reordering cells. The issue only happens on cell deletion. There is however no error message in the output tab.

I want to make sure we're talking about the same thing. It sounds like you're saying that syntax highlighting, etc stops working when you delete a cell. I'm asking if after that occurs, does adding/deleting/reordering a cell cause Pylance to crash.

I'm trying to determine if this is a duplicate of #4685. There are two stages to that bug. First you lose language server functionality (ex. hover, semantic highlighting) as you described above and then if you change the structure of a notebook, Pylance will crash with the Chained file path...doesn't match cellFilePaths error.

@debonte debonte added waiting for user response Requires more information from user and removed user responded Was "waiting for user response" and they responded labels Aug 27, 2023
@Koowah
Copy link
Author

Koowah commented Aug 27, 2023

@debonte Sorry I misunderstood. It does indeed cause pylance to crash ! Probably a duplicate of #4685 then 😄

@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 Aug 27, 2023
@debonte
Copy link
Contributor

debonte commented Aug 27, 2023

Excellent, thanks for confirming! I'll resolve this issue as a duplicate. Keep an eye on #4685 for updates.

@debonte debonte closed this as completed Aug 27, 2023
@debonte debonte assigned debonte and unassigned StellaHuang95 Aug 27, 2023
@debonte debonte added duplicate This issue or pull request already exists and removed user responded Was "waiting for user response" and they responded labels Aug 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

5 participants