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: Error: EMFILE: too many open files #116448

Closed
jajcayn opened this issue Feb 11, 2021 · 1 comment
Closed

Pylance: Error: EMFILE: too many open files #116448

jajcayn opened this issue Feb 11, 2021 · 1 comment

Comments

@jajcayn
Copy link

jajcayn commented Feb 11, 2021

  • VS Code Version: 1.53.1; Commit: 5d424b8
  • OS Version: macOS Catalina 10.15.7 (19H512)

Steps to Reproduce:

  1. open python workspace in VSCode with pylance as the language server
  2. I have only three open files and already getting this error

Does this issue occur when all extensions are disabled?: Yes/No
No, since this is happening with pylance, however, pylance was not recently updated, but VSCode was, so I think it's a VSCode issue

full error:

[Error - 1:12:16 PM] An internal error occurred while parsing file "/Users/nikola/work-dev/neurolib/tests/test_collections.py": Error: EMFILE: too many open files, scandir '/Users/nikola/work-dev/neurolib'
    at Object.readdirSync (fs.js:959:3)
    at Object.e.readdirSync (electron/js2c/asar_bundle.js:5:10231)
    at h.readdirEntriesSync (/Users/nikola/.vscode/extensions/ms-python.vscode-pylance-2021.2.1/dist/pyright.bundle.js:1:609711)
    at B._getFilesInDirectory (/Users/nikola/.vscode/extensions/ms-python.vscode-pylance-2021.2.1/dist/pyright.bundle.js:1:160020)
    at B.resolveAbsoluteImport (/Users/nikola/.vscode/extensions/ms-python.vscode-pylance-2021.2.1/dist/pyright.bundle.js:1:152915)
    at B._resolveBestAbsoluteImport (/Users/nikola/.vscode/extensions/ms-python.vscode-pylance-2021.2.1/dist/pyright.bundle.js:1:155203)
    at B.resolveImport (/Users/nikola/.vscode/extensions/ms-python.vscode-pylance-2021.2.1/dist/pyright.bundle.js:1:147689)
    at t.SourceFile._resolveImports (/Users/nikola/.vscode/extensions/ms-python.vscode-pylance-2021.2.1/dist/pyright.bundle.js:1:254912)
    at /Users/nikola/.vscode/extensions/ms-python.vscode-pylance-2021.2.1/dist/pyright.bundle.js:1:247540
    at i.timeOperation (/Users/nikola/.vscode/extensions/ms-python.vscode-pylance-2021.2.1/dist/pyright.bundle.js:1:631349)

I started getting this error yesterday, after update to VSCode 1.53.1; before it was fine. At first I tried to exclude folder like logs or build from search etc, but this didn't help. Before yesterday, I could open much larger workspace without any problems, no set excludes, everything just worked. Now even for rather small workspaces I am getting this error.

Thanks!

@jajcayn
Copy link
Author

jajcayn commented Feb 11, 2021

I am sorry, right now I found the same issue directly in the Pylance repository (microsoft/pylance-release#936)
Closing this issue as it relates to pylance

@jajcayn jajcayn closed this as completed Feb 11, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Mar 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant