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 Function Info Broken in Interactive Outside Import Cell #12434

Closed
1 of 2 tasks
sachit-menon opened this issue Dec 22, 2022 · 1 comment
Closed
1 of 2 tasks
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug interactive-window Impacts interactive window

Comments

@sachit-menon
Copy link

Applies To

  • Notebooks (.ipynb files)
  • Interactive Window and/or Cell Scripts (.py files with #%% markers)

What happened?

Hi, I'm not sure exactly what this is called, but one very useful feature for me in the standard editor is the documentation overlay that shows up as you're writing. This is not working for me when running in the Interactive window, but does work in notebooks (as well as standard .py files), as below:

In Notebook (correct):
image

In Interactive Window (after running cell for import):
image

This holds regardless of the Enable Extended Kernel Completions setting. It holds before running anything in the window as well as afterwards.

It might be related to #11062 but is distinct in that it actually works for ipynb files for me, just not anything in the interactive window. I am using Pylance and have included the language server output with the Jupyter logs in case it is relevant.

VS Code Version

Version: 1.74.0 Commit: 5235c6bb189b60b01b1f49062f4ffa42384f8c91 Date: 2022-12-05T16:43:37.594Z (2 wks ago) Electron: 19.1.8 Chromium: 102.0.5005.167 Node.js: 16.14.2 V8: 10.2.154.15-electron.0 OS: Darwin x64 20.6.0 Sandboxed: No

Jupyter Extension Version

v2022.11.1003412109

Jupyter logs

Visual Studio Code (1.74.0, undefined, desktop)
Jupyter Extension Version: 2022.11.1003412109.
Python Extension Version: 2022.20.1.
No workspace folder opened.
info 13:46:35.727: ZMQ install verified.
User belongs to experiment group 'jupyterTestcf'
User belongs to experiment group 'jupyterEnhancedDataViewer'
info 13:46:36.665: Old kernelSpecs (created by Jupyter Extension) stored in directory /Users/sachit/Library/Jupyter/kernels/__old_vscode_kernelspecs
info 13:46:36.675: LSP Notebooks experiment is enabled
info 13:46:39.727: Preferred Remote kernel for Untitled-1.ipynb is undefined
info 13:46:39.746: Preferred Remote kernel for Untitled-1.ipynb is undefined
info 13:46:39.746: Find preferred kernel for Untitled-1.ipynb with metadata {"kernelspec":{"display_name":"misc","language":"python","name":"python3"},"language_info":{"codemirror_mode":{"name":"ipython","version":3},"file_extension":".py","mimetype":"text/x-python","name":"python","nbconvert_exporter":"python","pygments_lexer":"ipython3","version":"3.10.4"},"orig_nbformat":4,"vscode":{"interpreter":{"hash":"3a0a9f1ad530a6ecda55778ba8c700870f9cb967a31d43d3b102fbd9a2b4454d"}}} & preferred interpreter /Users/sachit/opt/miniconda3/envs/misc/bin/python
info 13:46:39.747: Preferred Remote kernel for Untitled-1.ipynb is undefined
error 13:46:39.759: Execing shell command, Class name = f, completed in 103ms, has a falsy return value, Arg 1: "~/.vscode/extensions/ms-toolsai.jupyter-2022.11.1003412109/pythonFiles/printEnvVariables.py", Arg 2: "" Error: Command failed: conda activate misc && echo 'e8b39361-0157-4923-80e1-22d70d46dee6' && python /Users/sachit/.vscode/extensions/ms-toolsai.jupyter-2022.11.1003412109/pythonFiles/printEnvVariables.py
bash: conda: command not found

    at ChildProcess.exithandler (node:child_process:408:12)
    at ChildProcess.emit (node:events:526:28)
    at maybeClose (node:internal/child_process:1092:16)
    at Socket.<anonymous> (node:internal/child_process:451:11)
    at Socket.emit (node:events:526:28)
    at Pipe.<anonymous> (node:net:687:12) {
  killed: false,
  code: 127,
  signal: null,
  cmd: "conda activate misc && echo 'e8b39361-0157-4923-80e1-22d70d46dee6' && python /Users/sachit/.vscode/extensions/ms-toolsai.jupyter-2022.11.1003412109/pythonFiles/printEnvVariables.py"
}
info 13:46:39.765: Process Execution: > ~/opt/miniconda3/envs/misc/bin/python -m pip list
> ~/opt/miniconda3/envs/misc/bin/python -m pip list
info 13:46:39.778: Preferred Remote kernel for Untitled-1.ipynb is undefined
info 13:46:39.778: Preferred kernel .jvsc74a57bd03a0a9f1ad530a6ecda55778ba8c700870f9cb967a31d43d3b102fbd9a2b4454d./Users/sachit/opt/miniconda3/envs/misc/python./Users/sachit/opt/miniconda3/envs/misc/python.-m#ipykernel_launcher is exact match or top match for non python kernels, (false, [object Object], true, false)
info 13:46:39.780: PreferredConnection: .jvsc74a57bd03a0a9f1ad530a6ecda55778ba8c700870f9cb967a31d43d3b102fbd9a2b4454d./Users/sachit/opt/miniconda3/envs/misc/python./Users/sachit/opt/miniconda3/envs/misc/python.-m#ipykernel_launcher found for NotebookDocument: Untitled-1.ipynb
info 13:46:40.839: Got env vars with python /Users/sachit/opt/miniconda3/envs/misc/bin/python, with env var count 42 and custom env var count 0 in 1210ms
warn 13:46:41.490: Python environment /Users/sachit/opt/miniconda3/envs/image_scraper excluded as Uri is undefined
error 13:46:41.490: Failed to get env details from Python API for /Users/sachit/opt/miniconda3/envs/image_scraper without an error
warn 13:46:41.495: Python environment /Users/sachit/opt/miniconda3/envs/image_scraper excluded as Uri is undefined
error 13:46:41.495: Failed to get env details from Python API for /Users/sachit/opt/miniconda3/envs/image_scraper without an error
warn 13:46:41.503: Python environment /Users/sachit/opt/miniconda3/envs/image_scraper excluded as Uri is undefined
error 13:46:41.503: Failed to get env details from Python API for /Users/sachit/opt/miniconda3/envs/image_scraper without an error
warn 13:46:41.506: Python environment /Users/sachit/opt/miniconda3/envs/image_scraper excluded as Uri is undefined
error 13:46:41.506: Failed to get env details from Python API for /Users/sachit/opt/miniconda3/envs/image_scraper without an error
warn 13:46:41.510: Python environment /Users/sachit/opt/miniconda3/envs/image_scraper excluded as Uri is undefined
error 13:46:41.511: Failed to get env details from Python API for /Users/sachit/opt/miniconda3/envs/image_scraper without an error
warn 13:46:41.513: Python environment /Users/sachit/opt/miniconda3/envs/image_scraper excluded as Uri is undefined
error 13:46:41.513: Failed to get env details from Python API for /Users/sachit/opt/miniconda3/envs/image_scraper without an error
warn 13:46:41.514: Python environment /Users/sachit/opt/miniconda3/envs/image_scraper excluded as Uri is undefined
error 13:46:41.514: Failed to get env details from Python API for /Users/sachit/opt/miniconda3/envs/image_scraper without an error
warn 13:46:41.516: Python environment /Users/sachit/opt/miniconda3/envs/image_scraper excluded as Uri is undefined
error 13:46:41.516: Failed to get env details from Python API for /Users/sachit/opt/miniconda3/envs/image_scraper without an error
warn 13:46:41.517: Python environment /Users/sachit/opt/miniconda3/envs/image_scraper excluded as Uri is undefined
error 13:46:41.517: Failed to get env details from Python API for /Users/sachit/opt/miniconda3/envs/image_scraper without an error
warn 13:46:41.518: Python environment /Users/sachit/opt/miniconda3/envs/image_scraper excluded as Uri is undefined
error 13:46:41.518: Failed to get env details from Python API for /Users/sachit/opt/miniconda3/envs/image_scraper without an error
warn 13:46:41.519: Python environment /Users/sachit/opt/miniconda3/envs/image_scraper excluded as Uri is undefined
error 13:46:41.519: Failed to get env details from Python API for /Users/sachit/opt/miniconda3/envs/image_scraper without an error
warn 13:46:41.521: Python environment /Users/sachit/opt/miniconda3/envs/image_scraper excluded as Uri is undefined
error 13:46:41.521: Failed to get env details from Python API for /Users/sachit/opt/miniconda3/envs/image_scraper without an error
warn 13:46:41.522: Python environment /Users/sachit/opt/miniconda3/envs/image_scraper excluded as Uri is undefined
error 13:46:41.522: Failed to get env details from Python API for /Users/sachit/opt/miniconda3/envs/image_scraper without an error
warn 13:46:41.524: Python environment /Users/sachit/opt/miniconda3/envs/image_scraper excluded as Uri is undefined
error 13:46:41.524: Failed to get env details from Python API for /Users/sachit/opt/miniconda3/envs/image_scraper without an error
warn 13:46:41.527: Python environment /Users/sachit/opt/miniconda3/envs/image_scraper excluded as Uri is undefined
error 13:46:41.527: Failed to get env details from Python API for /Users/sachit/opt/miniconda3/envs/image_scraper without an error
warn 13:46:41.528: Python environment /Users/sachit/opt/miniconda3/envs/image_scraper excluded as Uri is undefined
error 13:46:41.528: Failed to get env details from Python API for /Users/sachit/opt/miniconda3/envs/image_scraper without an error
warn 13:46:41.529: Python environment /Users/sachit/opt/miniconda3/envs/image_scraper excluded as Uri is undefined
error 13:46:41.529: Failed to get env details from Python API for /Users/sachit/opt/miniconda3/envs/image_scraper without an error
info 13:47:09.006: Starting interactive window for resource '' with controller '.jvsc74a57bd03a0a9f1ad530a6ecda55778ba8c700870f9cb967a31d43d3b102fbd9a2b4454d./Users/sachit/opt/miniconda3/envs/misc/python./Users/sachit/opt/miniconda3/envs/misc/python.-m#ipykernel_launcher (Interactive)'
info 13:47:09.071: Preferred Remote kernel for Interactive-1.interactive is undefined
info 13:47:09.376: Starting Jupyter Session startUsingPythonInterpreter, .jvsc74a57bd03a0a9f1ad530a6ecda55778ba8c700870f9cb967a31d43d3b102fbd9a2b4454d./Users/sachit/opt/miniconda3/envs/misc/python./Users/sachit/opt/miniconda3/envs/misc/python.-m#ipykernel_launcher (Python Path: /Users/sachit/opt/miniconda3/envs/misc, EnvType: Conda, EnvName: 'misc', Version: 3.10.4 (main, Mar 31 2022, 03:38:35) [Clang 12.0.0 ]) for 'Interactive-1.interactive' (disableUI=false)
info 13:47:09.377: Computing working directory for resource ''
info 13:47:09.383: Got env vars with python /Users/sachit/opt/miniconda3/envs/misc/bin/python, with env var count 42 and custom env var count 0 in 5ms
info 13:47:09.383: Got env vars from Python Ext faster /Users/sachit/opt/miniconda3/envs/misc/bin/python with env var count 42 in 5ms
info 13:47:09.391: Process Execution: > ~/opt/miniconda3/envs/misc/bin/python -c "import ipykernel; print(ipykernel.__version__); print("5dc3a68c-e34e-4080-9c3e-2a532b2ccb4d"); print(ipykernel.__file__)"
> ~/opt/miniconda3/envs/misc/bin/python -c "import ipykernel; print(ipykernel.__version__); print("5dc3a68c-e34e-4080-9c3e-2a532b2ccb4d"); print(ipykernel.__file__)"
error 13:47:09.414: Execing shell command, Class name = f, completed in 28ms, has a falsy return value, Arg 1: "~/.vscode/extensions/ms-toolsai.jupyter-2022.11.1003412109/pythonFiles/printEnvVariables.py", Arg 2: "" Error: Command failed: conda activate misc && echo 'e8b39361-0157-4923-80e1-22d70d46dee6' && python /Users/sachit/.vscode/extensions/ms-toolsai.jupyter-2022.11.1003412109/pythonFiles/printEnvVariables.py
bash: conda: command not found

    at ChildProcess.exithandler (node:child_process:408:12)
    at ChildProcess.emit (node:events:526:28)
    at maybeClose (node:internal/child_process:1092:16)
    at Socket.<anonymous> (node:internal/child_process:451:11)
    at Socket.emit (node:events:526:28)
    at Pipe.<anonymous> (node:net:687:12) {
  killed: false,
  code: 127,
  signal: null,
  cmd: "conda activate misc && echo 'e8b39361-0157-4923-80e1-22d70d46dee6' && python /Users/sachit/.vscode/extensions/ms-toolsai.jupyter-2022.11.1003412109/pythonFiles/printEnvVariables.py"
}
info 13:47:09.422: Got env vars with python /Users/sachit/opt/miniconda3/envs/misc/bin/python, with env var count 42 and custom env var count 0 in 1ms
info 13:47:09.422: Got env vars with python /Users/sachit/opt/miniconda3/envs/misc/bin/python, with env var count 42 and custom env var count 0 in 1ms
info 13:47:09.423: No custom variables nor do we have a conda environment
info 13:47:09.428: Process Execution: > ~/opt/miniconda3/envs/misc/bin/python -m ipykernel_launcher --ip=127.0.0.1 --stdin=9003 --control=9001 --hb=9000 --Session.signature_scheme="hmac-sha256" --Session.key=b"0c455eff-3072-49c4-9395-cb0c330889f7" --shell=9002 --transport="tcp" --iopub=9004 --f=/Users/sachit/Library/Jupyter/runtime/kernel-v2-58102HxTeSeQhLR2G.json
> ~/opt/miniconda3/envs/misc/bin/python -m ipykernel_launcher --ip=127.0.0.1 --stdin=9003 --control=9001 --hb=9000 --Session.signature_scheme="hmac-sha256" --Session.key=b"0c455eff-3072-49c4-9395-cb0c330889f7" --shell=9002 --transport="tcp" --iopub=9004 --f=/Users/sachit/Library/Jupyter/runtime/kernel-v2-58102HxTeSeQhLR2G.json
info 13:47:09.428: Process Execution: cwd: /
cwd: /
info 13:47:09.820: ipykernel version & path 6.15.2, ~/opt/miniconda3/envs/misc/lib/python3.10/site-packages/ipykernel/__init__.py for /Users/sachit/opt/miniconda3/envs/misc/bin/python
info 13:47:10.403: Kernel Output: To connect another client to this kernel, use: --existing kernel-v2-58102HxTeSeQhLR2G.json

info 13:47:10.480: Started Kernel misc (Python 3.10.4) (pid: 58477)
info 13:47:10.511: Got env vars with python /Users/sachit/opt/miniconda3/envs/misc/bin/python, with env var count 42 and custom env var count 0 in 2ms
info 13:47:10.515: Process Execution: > ~/opt/miniconda3/envs/misc/bin/python ~/.vscode/extensions/ms-toolsai.jupyter-2022.11.1003412109/pythonFiles/printJupyterDataDir.py
> ~/opt/miniconda3/envs/misc/bin/python ~/.vscode/extensions/ms-toolsai.jupyter-2022.11.1003412109/pythonFiles/printJupyterDataDir.py
warn 13:47:10.557: Got a non-existent Jupyer Data Dir file:///Users/sachit/.local/share/jupyter


Language Server Output:
[Info  - 1:46:40 PM] (58241) Pylance language server 2022.12.20 (pyright 621d886b) starting
[Info  - 1:46:40 PM] (58241) Server root directory: /Users/sachit/.vscode/extensions/ms-python.vscode-pylance-2022.12.20/dist
[Info  - 1:46:40 PM] (58241) Notebook support: LSP
[Info  - 1:46:40 PM] (58241) Interactive window support: LSP
[Info  - 1:46:40 PM] (58241) Starting service instance "<default>"
[Info  - 1:46:41 PM] (58241) virtual workspace: untitled:Untitled-1.ipynb?jupyter-notebook
[Info  - 1:46:41 PM] (58241) Starting service instance "Untitled-1.ipynb"
[Info  - 1:46:41 PM] (58241) No pyproject.toml file found.
[Info  - 1:46:41 PM] (58241) Setting pythonPath for service "<default>": "/Users/sachit/opt/miniconda3/envs/misc/bin/python"
[Warn  - 1:46:41 PM] (58241) stubPath typings is not a valid directory.
[Info  - 1:46:41 PM] (58241) Assuming Python version 3.10
[Info  - 1:46:41 PM] (58241) Assuming Python platform Darwin
[Info  - 1:46:41 PM] (58241) Searching for source files
[Info  - 1:46:41 PM] (58241) No source files found.
[Info  - 1:46:41 PM] (58241) No pyproject.toml file found.
[Info  - 1:46:41 PM] (58241) Setting pythonPath for service "<default>": "/Users/sachit/opt/miniconda3/envs/misc/bin/python"
[Warn  - 1:46:41 PM] (58241) stubPath typings is not a valid directory.
[Info  - 1:46:41 PM] (58241) Assuming Python version 3.10
[Info  - 1:46:41 PM] (58241) Assuming Python platform Darwin
[Info  - 1:46:41 PM] (58241) Searching for source files
[Info  - 1:46:41 PM] (58241) No source files found.
[Info  - 1:46:41 PM] (58241) Background analysis(1) root directory: /Users/sachit/.vscode/extensions/ms-python.vscode-pylance-2022.12.20/dist
[Info  - 1:46:41 PM] (58241) Background analysis(1) started
[Info  - 1:46:41 PM] (58241) No pyproject.toml file found.
[Info  - 1:46:41 PM] (58241) Setting pythonPath for service "Untitled-1.ipynb": "/Users/sachit/opt/miniconda3/envs/misc/bin/python"
[Warn  - 1:46:41 PM] (58241) stubPath typings is not a valid directory.
[Info  - 1:46:41 PM] (58241) Assuming Python version 3.10
[Info  - 1:46:41 PM] (58241) Assuming Python platform Darwin
[Info  - 1:46:41 PM] (58241) Searching for source files
[Error - 1:46:41 PM] (58241) File or directory "" does not exist.
[Info  - 1:46:41 PM] (58241) No source files found.
[Info  - 1:47:15 PM] (58241) virtual workspace: vscode-interactive:Interactive-1.interactive
[Info  - 1:47:15 PM] (58241) Starting service instance "Interactive-1.interactive"
[Info  - 1:47:15 PM] (58241) No pyproject.toml file found.
[Info  - 1:47:15 PM] (58241) Setting pythonPath for service "Interactive-1.interactive": "/Users/sachit/opt/miniconda3/envs/misc/bin/python"
[Warn  - 1:47:15 PM] (58241) stubPath typings is not a valid directory.
[Info  - 1:47:15 PM] (58241) Assuming Python version 3.10
[Info  - 1:47:15 PM] (58241) Assuming Python platform Darwin
[Info  - 1:47:15 PM] (58241) Searching for source files
[Error - 1:47:15 PM] (58241) File or directory "" does not exist.
[Info  - 1:47:15 PM] (58241) No source files found.
[Info  - 1:47:15 PM] (58241) No pyproject.toml file found.
[Info  - 1:47:15 PM] (58241) Setting pythonPath for service "Interactive-1.interactive": "/Users/sachit/opt/miniconda3/envs/misc/bin/python"
[Warn  - 1:47:15 PM] (58241) stubPath typings is not a valid directory.
[Info  - 1:47:15 PM] (58241) Assuming Python version 3.10
[Info  - 1:47:15 PM] (58241) Assuming Python platform Darwin
[Info  - 1:47:15 PM] (58241) Searching for source files
[Error - 1:47:15 PM] (58241) File or directory "" does not exist.
[Info  - 1:47:15 PM] (58241) Found 1 source file

Coding Language and Runtime Version

3.10.4

Language Extension Version (if applicable)

v2022.20.1

Anaconda Version (if applicable)

4.11.0

Running Jupyter locally or remotely?

Local

@sachit-menon sachit-menon added the bug Issue identified by VS Code Team member as probable bug label Dec 22, 2022
@rebornix rebornix added the interactive-window Impacts interactive window label Jan 3, 2023
@amunger amunger modified the milestone: March 2023 Mar 2, 2023
@amunger
Copy link
Contributor

amunger commented Mar 2, 2023

duplicate of microsoft/vscode#154983

@amunger amunger closed this as not planned Won't fix, can't repro, duplicate, stale Mar 2, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug interactive-window Impacts interactive window
Projects
None yet
Development

No branches or pull requests

3 participants