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

Intellisense information unavailable for librosa methods #852

Closed
agkphysics opened this issue Jan 19, 2021 · 2 comments
Closed

Intellisense information unavailable for librosa methods #852

agkphysics opened this issue Jan 19, 2021 · 2 comments

Comments

@agkphysics
Copy link

Environment data

  • Language Server version: 2021.1.1
  • OS and version: Linux - Ubuntu 20.04 - x64
  • Python version (and distribution if applicable, e.g. Anaconda): 3.8.5
  • python.analysis.indexing: undefined
  • python.analysis.typeCheckingMode: off

Expected behaviour

The methods will have correct Intellisense information.

Actual behaviour

The methods have no Intellisense information apart from load: Any:
Screenshot 2021-01-20 033607

Logs

Python Language Server Log
[Info  - 3:30:00 AM] Pylance language server 2021.1.1 (pyright 6a970b45) starting
[Info  - 3:30:00 AM] Server root directory: /home/akee511/.vscode-server/extensions/ms-python.vscode-pylance-2021.1.1/dist
[Info  - 3:30:00 AM] No configuration file found.
[Info  - 3:30:00 AM] Setting pythonPath for service "emotion": "/home/akee511/src/emotion/.venv/bin/python"
Search paths found for configured python interpreter:
  /usr/lib/python3.8
  /usr/lib/python3.8/lib-dynload
  /home/akee511/src/emotion/.venv/lib/python3.8/site-packages
  /home/akee511/src/emotion
[Error - 3:30:00 AM] stubPath /home/akee511/src/emotion/typings is not a valid directory.
[Info  - 3:30:00 AM] Assuming Python version 3.8
[Info  - 3:30:00 AM] Assuming Python platform Linux
[Info  - 3:30:00 AM] Searching for source files
[Info  - 3:30:00 AM] Auto-excluding /home/akee511/src/emotion/.venv
[Info  - 3:30:00 AM] Found 143 source files
[Info  - 3:30:00 AM] Background analysis(1) root directory: /home/akee511/.vscode-server/extensions/ms-python.vscode-pylance-2021.1.1/dist
[Info  - 3:30:00 AM] Background analysis(1) started
Background analysis message: setConfigOptions
Background analysis message: setTrackedFiles
IntelliCode model /home/akee511/.vscode-server/extensions/visualstudioexptteam.vscodeintellicode-1.2.10/cache/E61945A9A512ED5E1A3EE3F1A2365B88F8FE_E4E9EADA96734F01970E616FAB2FAC19
Loading ONNX runtime...
Loaded ONNX runtime. Creating IntelliCode session...
2021-01-20 02:30:01.033360533 [I:onnxruntime:, inference_session.cc:174 ConstructorCommon] Creating and using per session threadpools since use_per_session_threads_ is true
2021-01-20 02:30:01.034408260 [I:onnxruntime:, inference_session.cc:840 Initialize] Initializing session.
2021-01-20 02:30:01.034418379 [I:onnxruntime:, inference_session.cc:865 Initialize] Adding default CPU execution provider.
2021-01-20 02:30:01.035176104 [I:onnxruntime:, reshape_fusion.cc:37 ApplyImpl] Total fused reshape node count: 0
2021-01-20 02:30:01.035431952 [I:onnxruntime:, reshape_fusion.cc:37 ApplyImpl] Total fused reshape node count: 0
2021-01-20 02:30:01.036876299 [V:onnxruntime:, inference_session.cc:679 TransformGraph] Node placements
2021-01-20 02:30:01.036882471 [V:onnxruntime:, inference_session.cc:681 TransformGraph] All nodes have been placed on [CPUExecutionProvider].
2021-01-20 02:30:01.036897649 [V:onnxruntime:, session_state.cc:71 CreateGraphInfo] SaveMLValueNameIndexMapping
2021-01-20 02:30:01.036923407 [V:onnxruntime:, session_state.cc:116 CreateGraphInfo] Done saving OrtValue mappings.
2021-01-20 02:30:01.037385911 [I:onnxruntime:, finalize_session_state.cc:173 SaveInitializedTensors] Saving initialized tensors.
2021-01-20 02:30:01.046758003 [I:onnxruntime:, finalize_session_state.cc:225 SaveInitializedTensors] Done saving initialized tensors
2021-01-20 02:30:01.048976446 [I:onnxruntime:, inference_session.cc:954 Initialize] Session successfully initialized.
Created IntelliCode session.
Background analysis message: markAllFilesDirty
Background analysis message: setFileOpened
Background analysis message: getSemanticTokens
[BG(1)] parsing: /home/akee511/src/emotion/scripts/preprocessing/vad_trim.py (19ms)
[BG(1)] parsing: /home/akee511/.vscode-server/extensions/ms-python.vscode-pylance-2021.1.1/dist/typeshed-fallback/stdlib/3/builtins.pyi [fs read 2ms] (68ms)
[BG(1)] binding: /home/akee511/.vscode-server/extensions/ms-python.vscode-pylance-2021.1.1/dist/typeshed-fallback/stdlib/3/builtins.pyi (32ms)
[BG(1)] binding: /home/akee511/src/emotion/scripts/preprocessing/vad_trim.py (1ms)
[BG(1)] parsing: /home/akee511/.vscode-server/extensions/ms-python.vscode-pylance-2021.1.1/dist/typeshed-fallback/stdlib/3/pathlib.pyi [fs read 1ms] (8ms)
[BG(1)] binding: /home/akee511/.vscode-server/extensions/ms-python.vscode-pylance-2021.1.1/dist/typeshed-fallback/stdlib/3/pathlib.pyi (2ms)
[BG(1)] parsing: /home/akee511/.vscode-server/extensions/ms-python.vscode-pylance-2021.1.1/dist/typeshed-fallback/stdlib/2and3/_typeshed/__init__.pyi [fs read 0ms] (5ms)
[BG(1)] binding: /home/akee511/.vscode-server/extensions/ms-python.vscode-pylance-2021.1.1/dist/typeshed-fallback/stdlib/2and3/_typeshed/__init__.pyi (1ms)
[BG(1)] parsing: /home/akee511/.vscode-server/extensions/ms-python.vscode-pylance-2021.1.1/dist/typeshed-fallback/third_party/2and3/typing_extensions.pyi [fs read 0ms] (5ms)
[BG(1)] binding: /home/akee511/.vscode-server/extensions/ms-python.vscode-pylance-2021.1.1/dist/typeshed-fallback/third_party/2and3/typing_extensions.pyi (1ms)
[BG(1)] parsing: /home/akee511/.vscode-server/extensions/ms-python.vscode-pylance-2021.1.1/dist/typeshed-fallback/stdlib/3/typing.pyi [fs read 0ms] (18ms)
[BG(1)] binding: /home/akee511/.vscode-server/extensions/ms-python.vscode-pylance-2021.1.1/dist/typeshed-fallback/stdlib/3/typing.pyi (9ms)
[BG(1)] parsing: /home/akee511/.vscode-server/extensions/ms-python.vscode-pylance-2021.1.1/dist/typeshed-fallback/stdlib/3/os/__init__.pyi [fs read 0ms] (16ms)
[BG(1)] binding: /home/akee511/.vscode-server/extensions/ms-python.vscode-pylance-2021.1.1/dist/typeshed-fallback/stdlib/3/os/__init__.pyi (6ms)
[BG(1)] parsing: /home/akee511/.vscode-server/extensions/ms-python.vscode-pylance-2021.1.1/dist/typeshed-fallback/stdlib/3/abc.pyi [fs read 0ms] (1ms)
[BG(1)] binding: /home/akee511/.vscode-server/extensions/ms-python.vscode-pylance-2021.1.1/dist/typeshed-fallback/stdlib/3/abc.pyi (0ms)
[BG(1)] parsing: /home/akee511/.vscode-server/extensions/ms-python.vscode-pylance-2021.1.1/dist/typeshed-fallback/third_party/2and3/click/__init__.pyi [fs read 0ms] (1ms)
[BG(1)] binding: /home/akee511/.vscode-server/extensions/ms-python.vscode-pylance-2021.1.1/dist/typeshed-fallback/third_party/2and3/click/__init__.pyi (1ms)
[BG(1)] parsing: /home/akee511/src/emotion/.venv/lib/python3.8/site-packages/librosa/__init__.py [fs read 0ms] (5ms)
[BG(1)] binding: /home/akee511/src/emotion/.venv/lib/python3.8/site-packages/librosa/__init__.py ...
[BG(1)]   parsing: /home/akee511/src/emotion/.venv/lib/python3.8/site-packages/librosa/util/exceptions.py [fs read 0ms] (0ms)
[BG(1)]   binding: /home/akee511/src/emotion/.venv/lib/python3.8/site-packages/librosa/util/exceptions.py (0ms)
[BG(1)]   parsing: /home/akee511/src/emotion/.venv/lib/python3.8/site-packages/librosa/core/__init__.py [fs read 1ms] (1ms)
[BG(1)]   binding: /home/akee511/src/emotion/.venv/lib/python3.8/site-packages/librosa/core/__init__.py ...
[BG(1)]     parsing: /home/akee511/src/emotion/.venv/lib/python3.8/site-packages/librosa/core/convert.py [fs read 0ms] (27ms)
[BG(1)]     binding: /home/akee511/src/emotion/.venv/lib/python3.8/site-packages/librosa/core/convert.py (4ms)
[BG(1)]     parsing: /home/akee511/src/emotion/.venv/lib/python3.8/site-packages/librosa/core/audio.py [fs read 0ms] (29ms)
[BG(1)]     binding: /home/akee511/src/emotion/.venv/lib/python3.8/site-packages/librosa/core/audio.py (4ms)
[BG(1)]     parsing: /home/akee511/src/emotion/.venv/lib/python3.8/site-packages/librosa/core/spectrum.py [fs read 1ms] (34ms)
[BG(1)]     binding: /home/akee511/src/emotion/.venv/lib/python3.8/site-packages/librosa/core/spectrum.py (6ms)
[BG(1)]     parsing: /home/akee511/src/emotion/.venv/lib/python3.8/site-packages/librosa/core/pitch.py [fs read 0ms] (7ms)
[BG(1)]     binding: /home/akee511/src/emotion/.venv/lib/python3.8/site-packages/librosa/core/pitch.py (2ms)
[BG(1)]     parsing: /home/akee511/src/emotion/.venv/lib/python3.8/site-packages/librosa/core/constantq.py [fs read 0ms] (15ms)
[BG(1)]     binding: /home/akee511/src/emotion/.venv/lib/python3.8/site-packages/librosa/core/constantq.py (3ms)
[BG(1)]     parsing: /home/akee511/src/emotion/.venv/lib/python3.8/site-packages/librosa/core/harmonic.py [fs read 0ms] (2ms)
[BG(1)]     binding: /home/akee511/src/emotion/.venv/lib/python3.8/site-packages/librosa/core/harmonic.py (0ms)
[BG(1)]     parsing: /home/akee511/src/emotion/.venv/lib/python3.8/site-packages/librosa/core/fft.py [fs read 1ms] (1ms)
[BG(1)]     binding: /home/akee511/src/emotion/.venv/lib/python3.8/site-packages/librosa/core/fft.py (0ms)
[BG(1)]     parsing: /home/akee511/src/emotion/.venv/lib/python3.8/site-packages/librosa/core/notation.py [fs read 0ms] (5ms)
[BG(1)]     binding: /home/akee511/src/emotion/.venv/lib/python3.8/site-packages/librosa/core/notation.py (1ms)
[BG(1)]   binding: /home/akee511/src/emotion/.venv/lib/python3.8/site-packages/librosa/core/__init__.py (140ms)
[BG(1)] binding: /home/akee511/src/emotion/.venv/lib/python3.8/site-packages/librosa/__init__.py (141ms)
[BG(1)] parsing: /home/akee511/src/emotion/emotion_recognition/dataset.py [fs read 0ms] (17ms)
[BG(1)] binding: /home/akee511/src/emotion/emotion_recognition/dataset.py (12ms)
[BG(1)] parsing: /home/akee511/.vscode-server/extensions/ms-python.vscode-pylance-2021.1.1/dist/typeshed-fallback/third_party/2and3/click/types.pyi [fs read 0ms] (4ms)
[BG(1)] binding: /home/akee511/.vscode-server/extensions/ms-python.vscode-pylance-2021.1.1/dist/typeshed-fallback/third_party/2and3/click/types.pyi (1ms)
[BG(1)] parsing: /home/akee511/.vscode-server/extensions/ms-python.vscode-pylance-2021.1.1/dist/typeshed-fallback/third_party/2and3/click/core.pyi [fs read 0ms] (5ms)
[BG(1)] binding: /home/akee511/.vscode-server/extensions/ms-python.vscode-pylance-2021.1.1/dist/typeshed-fallback/third_party/2and3/click/core.pyi (2ms)
[BG(1)] parsing: /home/akee511/.vscode-server/extensions/ms-python.vscode-pylance-2021.1.1/dist/typeshed-fallback/third_party/2and3/click/decorators.pyi [fs read 0ms] (4ms)
[BG(1)] binding: /home/akee511/.vscode-server/extensions/ms-python.vscode-pylance-2021.1.1/dist/typeshed-fallback/third_party/2and3/click/decorators.pyi (2ms)
Background analysis message: analyze
[BG(1)] analyzing: /home/akee511/src/emotion/scripts/preprocessing/vad_trim.py ...
[BG(1)]   checking: /home/akee511/src/emotion/scripts/preprocessing/vad_trim.py (5ms)
[BG(1)] analyzing: /home/akee511/src/emotion/scripts/preprocessing/vad_trim.py (5ms)
Background analysis message: getSemanticTokens
Background analysis message: resumeAnalysis
Background analysis message: getDiagnosticsForRange
Background analysis message: getDiagnosticsForRange
[FG] parsing: /home/akee511/src/emotion/scripts/preprocessing/vad_trim.py (24ms)
[FG] parsing: /home/akee511/.vscode-server/extensions/ms-python.vscode-pylance-2021.1.1/dist/typeshed-fallback/stdlib/3/builtins.pyi [fs read 2ms] (62ms)
[FG] binding: /home/akee511/.vscode-server/extensions/ms-python.vscode-pylance-2021.1.1/dist/typeshed-fallback/stdlib/3/builtins.pyi (25ms)
[FG] binding: /home/akee511/src/emotion/scripts/preprocessing/vad_trim.py (1ms)

Code Snippet / Additional information

import librosa

librosa.load()

I suspect this is related to #289 since each of librosa's submodules has something like:

__all__ = [_ for _ in dir() if not _.startswith("_")]
@jakebailey
Copy link
Member

jakebailey commented Jan 19, 2021

That line is something else; it both uses _ as a variable (oh dear), and does nothing that the default __all__ already doesn't already do (* already pulls everything that doesn't start with _)...

@judej judej added the needs investigation Could be an issue - needs investigation label Jan 19, 2021
@github-actions github-actions bot removed the triage label Jan 19, 2021
@jakebailey jakebailey added dynamic behavior and removed needs investigation Could be an issue - needs investigation labels Aug 27, 2021
@judej judej added the icebox label Sep 23, 2021
@agkphysics
Copy link
Author

This appears to be fixed with the latest release of Pylance (2022.1.0) and has also been fixed upstream in librosa/librosa#1430. So I will close this issue.

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

No branches or pull requests

3 participants