Skip to content

How to limit virtualenv file watches to prevent large workspace error #19622

Closed as not planned

Description

Discussed in #19523

Originally posted by ggydush-fn July 21, 2022
I have all of my virtual environments in a single folder (~/.virtualenvs/) and found that this causes the following issue in Vscode (even in an empty project):

Unable to watch for file changes in this large workspace folder. Please follow the instructions link to resolve this issue.

The logs show that the Python extension is watching the ~/.virtualenvs directory, but does it need to watch all files in these directories? When working on multiple projects, this can easily exceed the watcher limit (which I don't have much control over setting, as I'm operating on a remote machine).

Disabling the Python extension resolves, but am wondering if anyone else has come across this and knows a way around it? I've tried modifying Vscode's setting "files.watcherExclude" but that did not seem to have an effect.

Activity

  1. added
    bugIssue identified by VS Code Team member as probable bug
    area-environmentsFeatures relating to handling interpreter environments
    on Aug 4, 2022
  2. karrtikr commented on Aug 4, 2022

    @karrtikr
  3. karrtikr commented on Aug 12, 2022

    @karrtikr

    ggydush-fn Ideally the setting should help, I suggest to open a bug in https://github.com/microsoft/vscode/issues, it's possibly the same as microsoft/vscode#151827.

    As to what the extension can do, try a couple of things:

    • Do you have poetry environments? I think that's the only global watching extension does is that.
    • Try disabling Pylance extension which also does some watching. Set python.languageServer to Jedi.

    Lastly, please provide the logs as mentioned in the issue template. Set python.logging.level to debug in User settings, reload window, then perform the steps to reproduce before providing the logs.

    Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)

    XXX
    

    It contains information as to what and why we watch certain directories.

  4. brettcannon commented on Sep 29, 2022

    @brettcannon
    MemberAuthor

    Because we have not heard back with the information we requested, we are closing this issue for now. If you are able to provide the info later on then we will be happy to re-open this issue to pick up where we left off.

  5. locked as resolved and limited conversation to collaborators on Oct 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area-environmentsFeatures relating to handling interpreter environmentsbugIssue identified by VS Code Team member as probable buginfo-neededIssue requires more information from postertriage-neededNeeds assignment to the proper sub-team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions