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

remote-ssh/ubuntu: newly added packages not discovered automatically #1717

Closed
tekumara opened this issue Aug 24, 2021 · 3 comments
Closed

remote-ssh/ubuntu: newly added packages not discovered automatically #1717

tekumara opened this issue Aug 24, 2021 · 3 comments

Comments

@tekumara
Copy link

Environment data

  • Language Server version: Pylance language server 2021.8.2 (pyright f462f5bb)
  • Vscode
    Version: 1.59.1
    Commit: 3866c3553be8b268c8a7f8c0482c0c0177aa8bfa
    Date: 2021-08-19T11:53:52.479Z (4 days ago)
    Electron: 13.1.7
    Chrome: 91.0.4472.124
    Node.js: 14.16.0
    V8: 9.1.269.36-electron.0
    OS: Darwin x64 20.5.0
  • Remote server: Ubuntu 18.04.5 LTS (Bionic Beaver), node v14.17.4

Expected behaviour

After running pip install in the virtualenv the import will automatically be discovered.

Actual behaviour

The import is not discovered.

Logs

[Info  - 4:14:33 AM] Pylance language server 2021.8.2 (pyright f462f5bb) starting
[Info  - 4:14:33 AM] Server root directory: /home/compute/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.2/dist
[Info  - 4:14:33 AM] Setting pythonPath for service "aec": "/home/compute/code/aec/.venv/bin/python"
[Info  - 4:14:33 AM] Loading configuration file at /home/compute/code/aec/pyrightconfig.json
[Info  - 4:14:33 AM] Assuming Python version 3.7
[Info  - 4:14:33 AM] Assuming Python platform Linux
[Info  - 4:14:33 AM] Auto-excluding **/node_modules
[Info  - 4:14:33 AM] Auto-excluding **/__pycache__
[Info  - 4:14:33 AM] Auto-excluding .git
[Warn  - 4:14:33 AM] stubPath /home/compute/code/aec/typings is not a valid directory.
Search paths for /home/compute/code/aec
  /home/compute/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.2/dist/typeshed-fallback/stdlib
  /home/compute/code/aec
  /home/compute/code/aec/src
  /home/compute/code/aec/typings
  /home/compute/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.2/dist/typeshed-fallback/stubs/...
  /home/compute/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.2/dist/bundled/stubs
  /usr/lib/python3.7
  /usr/lib/python3.7/lib-dynload
  /home/compute/code/aec/.venv/lib/python3.7/site-packages
  /home/compute/code/aec/src
[Warn  - 4:14:34 AM] Exception received when installing file system watcher: TypeError [ERR_FEATURE_UNAVAILABLE_ON_PLATFORM]: The feature watch recursively is unavailable on the current platform, which is being used to run Node.js
[Warn  - 4:14:34 AM] Exception received when installing file system watcher: TypeError [ERR_FEATURE_UNAVAILABLE_ON_PLATFORM]: The feature watch recursively is unavailable on the current platform, which is being used to run Node.js
[Info  - 4:14:34 AM] Searching for source files
[Info  - 4:14:34 AM] Found 23 source files
[Info  - 4:14:34 AM] Background analysis(1) root directory: /home/compute/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.2/dist
[Info  - 4:14:34 AM] Background analysis(1) started
Background analysis message: setConfigOptions
Background analysis message: setImportResolver
Background analysis message: ensurePartialStubPackages
Background analysis message: setTrackedFiles
Background analysis message: markAllFilesDirty
Background analysis message: setFileOpened
[FG] parsing: /home/compute/code/aec/src/aec/main.py (83ms)
[FG] parsing: /home/compute/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.2/dist/typeshed-fallback/stdlib/builtins.pyi [fs read 4ms] (113ms)
[FG] binding: /home/compute/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.2/dist/typeshed-fallback/stdlib/builtins.pyi (47ms)
[FG] binding: /home/compute/code/aec/src/aec/main.py (3ms)
Background analysis message: analyze
[BG(1)] analyzing: /home/compute/code/aec/src/aec/main.py ...
[BG(1)]   parsing: /home/compute/code/aec/src/aec/main.py (70ms)
[BG(1)]   parsing: /home/compute/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.2/dist/typeshed-fallback/stdlib/builtins.pyi [fs read 4ms] (133ms)
[BG(1)]   binding: /home/compute/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.2/dist/typeshed-fallback/stdlib/builtins.pyi (54ms)
[BG(1)]   binding: /home/compute/code/aec/src/aec/main.py (19ms)
[BG(1)]   checking: /home/compute/code/aec/src/aec/main.py ...
[BG(1)]     parsing: /home/compute/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.2/dist/typeshed-fallback/stdlib/typing.pyi [fs read 0ms] (44ms)
[BG(1)]     binding: /home/compute/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.2/dist/typeshed-fallback/stdlib/typing.pyi (32ms)
[BG(1)]     parsing: /home/compute/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.2/dist/typeshed-fallback/stdlib/_typeshed/__init__.pyi [fs read 0ms] (8ms)
[BG(1)]     binding: /home/compute/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.2/dist/typeshed-fallback/stdlib/_typeshed/__init__.pyi (2ms)
[BG(1)]     parsing: /home/compute/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.2/dist/typeshed-fallback/stdlib/typing_extensions.pyi [fs read 0ms] (2ms)
[BG(1)]     binding: /home/compute/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.2/dist/typeshed-fallback/stdlib/typing_extensions.pyi (8ms)
[BG(1)]     parsing: /home/compute/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.2/dist/typeshed-fallback/stdlib/argparse.pyi [fs read 0ms] (18ms)
[BG(1)]     binding: /home/compute/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.2/dist/typeshed-fallback/stdlib/argparse.pyi (6ms)
[BG(1)]     parsing: /home/compute/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.2/dist/typeshed-fallback/stdlib/sys.pyi [fs read 0ms] (8ms)
[BG(1)]     binding: /home/compute/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.2/dist/typeshed-fallback/stdlib/sys.pyi (3ms)
[BG(1)]     parsing: /home/compute/code/aec/src/aec/command/ami.py [fs read 0ms] (44ms)
[BG(1)]     binding: /home/compute/code/aec/src/aec/command/ami.py (3ms)
[BG(1)]     parsing: /home/compute/code/aec/src/aec/command/compute_optimizer.py [fs read 1ms] (11ms)
[BG(1)]     binding: /home/compute/code/aec/src/aec/command/compute_optimizer.py (1ms)
[BG(1)]     parsing: /home/compute/code/aec/src/aec/command/ec2.py [fs read 0ms] (20ms)
[BG(1)]     binding: /home/compute/code/aec/src/aec/command/ec2.py (6ms)
[BG(1)]     parsing: /home/compute/code/aec/src/aec/command/ssm.py [fs read 0ms] (19ms)
[BG(1)]     binding: /home/compute/code/aec/src/aec/command/ssm.py (4ms)
[BG(1)]     parsing: /home/compute/code/aec/src/aec/util/cli.py [fs read 0ms] (4ms)
[BG(1)]     binding: /home/compute/code/aec/src/aec/util/cli.py (2ms)
[BG(1)]     parsing: /home/compute/code/aec/src/aec/util/config.py [fs read 0ms] (4ms)
[BG(1)]     binding: /home/compute/code/aec/src/aec/util/config.py (2ms)
[BG(1)]     parsing: /home/compute/code/aec/src/aec/util/configure.py [fs read 0ms] (6ms)
[BG(1)]     binding: /home/compute/code/aec/src/aec/util/configure.py (1ms)
[BG(1)]     parsing: /home/compute/code/aec/src/aec/util/display.py [fs read 0ms] (7ms)
[BG(1)]     binding: /home/compute/code/aec/src/aec/util/display.py (1ms)
[BG(1)]     parsing: /home/compute/code/aec/.venv/lib/python3.7/site-packages/loguru/__init__.pyi [fs read 0ms] (41ms)
[BG(1)]     binding: /home/compute/code/aec/.venv/lib/python3.7/site-packages/loguru/__init__.pyi (5ms)
[BG(1)]     parsing: /home/compute/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.2/dist/typeshed-fallback/stdlib/abc.pyi [fs read 0ms] (1ms)
[BG(1)]     binding: /home/compute/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.2/dist/typeshed-fallback/stdlib/abc.pyi (1ms)
[BG(1)]     parsing: /home/compute/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.2/dist/typeshed-fallback/stdlib/inspect.pyi [fs read 1ms] (16ms)
[BG(1)]     binding: /home/compute/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.2/dist/typeshed-fallback/stdlib/inspect.pyi (18ms)
[BG(1)]     parsing: /home/compute/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.2/dist/typeshed-fallback/stdlib/collections/abc.pyi [fs read 0ms] (3ms)
[BG(1)]     binding: /home/compute/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.2/dist/typeshed-fallback/stdlib/collections/abc.pyi ...
[BG(1)]       parsing: /home/compute/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.2/dist/typeshed-fallback/stdlib/_collections_abc.pyi [fs read 0ms] (0ms)
[BG(1)]       binding: /home/compute/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.2/dist/typeshed-fallback/stdlib/_collections_abc.pyi (1ms)
[BG(1)]     binding: /home/compute/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.2/dist/typeshed-fallback/stdlib/collections/abc.pyi (2ms)
[BG(1)]     parsing: /home/compute/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.2/dist/typeshed-fallback/stdlib/enum.pyi [fs read 0ms] (2ms)
[BG(1)]     binding: /home/compute/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.2/dist/typeshed-fallback/stdlib/enum.pyi (2ms)
[BG(1)]   checking: /home/compute/code/aec/src/aec/main.py (602ms)
[BG(1)] analyzing: /home/compute/code/aec/src/aec/main.py (882ms)
Background analysis message: getDiagnosticsForRange
Background analysis message: getSemanticTokens full
[BG(1)] getSemanticTokens full at /home/compute/code/aec/src/aec/main.py (52ms)
Background analysis message: getSemanticTokens range
[BG(1)] getSemanticTokens range 0:0 - 31:30 at /home/compute/code/aec/src/aec/main.py (8ms)
Background analysis message: resumeAnalysis
Background analysis message: getDiagnosticsForRange
Background analysis message: getDiagnosticsForRange
Background analysis message: getDiagnosticsForRange

Code Snippet / Additional information

In this example, loguru was not detected after installation into the virtual env and import loguru could not be resolved .

vscode import

@jakebailey
Copy link
Member

Duplicate of #923.

@tekumara tekumara changed the title remote-ssh: newly added packages not discovered automatically remote-ssh/ubuntu: newly added packages not discovered automatically Aug 24, 2021
@tekumara
Copy link
Author

Use CMD+SHIFT+P Python:Restart language server to workaround this for now.

@jakebailey
Copy link
Member

Yep, that's the intended workaround to avoid a full editor reload.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants