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 still report problems in excluded or ignored directories, even in a closed file #5896

Closed
Saltsmart opened this issue May 18, 2024 · 8 comments
Assignees
Labels
duplicate This issue or pull request already exists

Comments

@Saltsmart
Copy link

Type: Bug

  1. Add a directory in "python.analysis.ignore" and "python.analysis.exclude"
  2. Leave a problem in the py or ipynb file in this directory
  3. Close the file

Extension version: 2024.5.1
VS Code version: Code 1.89.1 (dc96b837cf6bb4af9cd736aa3af08cf8279f7685, 2024-05-07T05:13:33.891Z)
OS version: Windows_NT x64 10.0.22000
Modes:

System Info
Item Value
CPUs Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz (12 x 2208)
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
Load (avg) undefined
Memory (System) 15.85GB (7.37GB free)
Process Argv --crash-reporter-id deaad0bf-2897-480e-b8cf-04d2a61dc2e3
Screen Reader no
VM 0%
A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
tftest:31042121
vscoreces:30445986
vscod805cf:30301675
binariesv615:30325510
vsaa593:30376534
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
962ge761:30959799
pythongtdpath:30769146
welcomedialog:30910333
pythonidxpt:30866567
pythonnoceb:30805159
asynctok:30898717
pythontestfixt:30902429
pythonregdiag2:30936856
pythonmypyd1:30879173
pythoncet0:30885854
h48ei257:31000450
pythontbext0:30879054
accentitlementst:30995554
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
chatpanelt:31048053
dsvsc021:30996838
0ee40948:31013168
pythoncenvpt:31049070
a69g1124:31046351
pythonprc:31047982
dwnewjupyter:31046869
26j00206:31048877

@github-actions github-actions bot added the needs repro Issue has not been reproduced yet label May 18, 2024
@Saltsmart
Copy link
Author

Here are some screenshots.
This problem seems to happen in large files or projects, as in this workspace.
These files contain private contents so I am sorry for unable to provide them.
3

@heejaechang
Copy link
Contributor

we will need logs to figure out.

Can you provide us some logs as described in the troubleshooting guide?

@Saltsmart
Copy link
Author

we will need logs to figure out.

Can you provide us some logs as described in the troubleshooting guide?

Python Language Server for issue #5896.log

Here is the log.

@heejaechang
Copy link
Contributor

heejaechang commented May 20, 2024

did you open bocd.ipynb from the .backup folder in vscode? or are you saying we showed the errors from it even if you never opened it? or are you saying you opened and closed it but we didn't clear the error? or are you saying you expect we ignore the bocd.ipynb even if you opened it since it is in exclude/ignore?

@heejaechang
Copy link
Contributor

by the way, I see this in the log

[BG(3)] Long operation: analyzing: git:/e%3A/Project/batterynet/datapreprocessing_and_plots.ipynb.py?%7B%22path%22%3A%22e%3A%5C%5CProject%5C%5Cbatterynet%5C%5Cdatapreprocessing_and_plots.ipynb%22%2C%22ref%22%3A%22~%22%7D#pylancePrefixCell (3138ms)

the request is coming from git:/, do you have some extensions that might send us the unexpected request?

@Saltsmart
Copy link
Author

Saltsmart commented May 21, 2024

did you open bocd.ipynb from the .backup folder in vscode? or are you saying we showed the errors from it even if you never opened it?

The errors are showed after I open this file.

or are you saying you opened and closed it but we didn't clear the error?

Yes, the errors are still there after the file is closed.

or are you saying you expect we ignore the bocd.ipynb even if you opened it since it is in exclude/ignore?

Yes, the expected behaviour is to ignore the file. Here is the note for python.analysis.ignore:
Paths of directories or files whose diagnostic output (errors and warnings) should be suppressed even if they are an included file or within the transitive closure of an included file. Paths may contain wildcard characters ** (a directory or multiple levels of directories), * (a sequence of zero or more characters), or ? (a single character).

@Saltsmart
Copy link
Author

@heejaechang Please refer to issue #5895 , these two issues sees to be caused by the same reason.

@rchiodo
Copy link
Contributor

rchiodo commented May 21, 2024

I believe this issue is a duplicate of this error:

#5402

Which is caused by how VS code tracks notebooks. It doesn't actually send us a close notification when the tab closes.

@rchiodo rchiodo closed this as completed May 21, 2024
@rchiodo rchiodo added duplicate This issue or pull request already exists and removed needs repro Issue has not been reproduced yet labels May 21, 2024
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

3 participants