microsoft / vscode-jupyter

VS Code Jupyter extension
https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter
MIT License
1.28k stars 290 forks source link

Object Attribute Explorer Not Working #11171

Closed irfan7junior closed 2 years ago

irfan7junior commented 2 years ago

Applies To

What happened?

I created a class in one cell, and at the bottom, I was creating the object and calling its attribute. Earlier while clicking ctrl + space it used to show me the methods or attributes that are available in the class but now it doesn't. When I disabled the Jupyter extension in VS Code it started showing up again. I've attached the screenshot, one when the extension was installed and the other when the extension wasn't. image image

VS Code Version

Version: 1.70.2

Jupyter Extension Version

v2022.7.1102252217

Jupyter logs

Visual Studio Code (1.70.2, undefined, desktop)
Jupyter Extension Version: 2022.7.1102252217.
Python Extension Version: 2022.12.1.
Workspace folder c:\Users\mdirf\codev\JobPractices
info 23:30:3.690: ZMQ install verified.
User belongs to experiment group 'jupyterTestcf'
User belongs to experiment group 'jupyterEnhancedDataViewer'
info 23:30:4.73: LSP Notebooks experiment is disabled -- Pylance disabled or not installed
info 23:30:4.95: Experiment status for python is {"enabled":true,"optInto":[],"optOutFrom":[]}
info 23:30:4.145: Preferred Remote kernel for c:\Users\mdirf\codev\JobPractices\main.ipynb is undefined
info 23:30:4.145: Find preferred kernel for c:\Users\mdirf\codev\JobPractices\main.ipynb with metadata {"kernelspec":{"display_name":"Python 3.10.6 64-bit","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.6"},"orig_nbformat":4,"vscode":{"interpreter":{"hash":"a1776a15d8f7067c06d42333c361ec625d8d9b322e2d0804f77800a943a7a072"}}} & preferred interpreter c:\Users\mdirf\AppData\Local\Programs\Python\Python310\python.exe
info 23:30:4.147: Preferred Remote kernel for c:\Users\mdirf\codev\JobPractices\main.ipynb is undefined
info 23:30:4.147: Preferred kernel .jvsc74a57bd0a1776a15d8f7067c06d42333c361ec625d8d9b322e2d0804f77800a943a7a072.c:\Users\mdirf\AppData\Local\Programs\Python\Python310\python.exe.c:\Users\mdirf\AppData\Local\Programs\Python\Python310\python.exe.-m#ipykernel_launcher is exact match or top match for non python kernels, (true, [object Object], true, false)
info 23:30:4.148: PreferredConnection: .jvsc74a57bd0a1776a15d8f7067c06d42333c361ec625d8d9b322e2d0804f77800a943a7a072.c:\Users\mdirf\AppData\Local\Programs\Python\Python310\python.exe.c:\Users\mdirf\AppData\Local\Programs\Python\Python310\python.exe.-m#ipykernel_launcher found for NotebookDocument: c:\Users\mdirf\codev\JobPractices\main.ipynb
info 23:30:4.174: Starting Jupyter Session id = 'startUsingPythonInterpreter:.jvsc74a57bd0a1776a15d8f7067c06d42333c361ec625d8d9b322e2d0804f77800a943a7a072.c:\Users\mdirf\AppData\Local\Programs\Python\Python310\python.exe.c:\Users\mdirf\AppData\Local\Programs\Python\Python310\python.exe.-m#ipykernel_launcher' (Python Path: , EnvType: Global, EnvName: '', Version: 3.10.6) for 'c:\Users\mdirf\codev\JobPractices\main.ipynb' (disableUI=true)
info 23:30:4.175: Creating raw notebook for resource 'c:\Users\mdirf\codev\JobPractices\main.ipynb'
info 23:30:4.175: Computing working directory for resource 'c:\Users\mdirf\codev\JobPractices\main.ipynb'
info 23:30:4.190: Starting raw kernel 'Python 3.10.6 64-bit' for interpreter c:\Users\mdirf\AppData\Local\Programs\Python\Python310\python.exe
info 23:30:4.228: Kernel launching with ports 9000,9001,9002,9003,9004. Start port is 9000
info 23:30:4.309: Process Execution: > ~\AppData\Local\Programs\Python\Python310\python.exe -m pip list
> ~\AppData\Local\Programs\Python\Python310\python.exe -m pip list
info 23:30:4.321: Process Execution: > ~\AppData\Local\Programs\Python\Python310\python.exe -c "import ipykernel; print(ipykernel.__version__); print("5dc3a68c-e34e-4080-9c3e-2a532b2ccb4d"); print(ipykernel.__file__)"
> ~\AppData\Local\Programs\Python\Python310\python.exe -c "import ipykernel; print(ipykernel.__version__); print("5dc3a68c-e34e-4080-9c3e-2a532b2ccb4d"); print(ipykernel.__file__)"
info 23:30:4.331: Creating daemon process for c:\Users\mdirf\AppData\Local\Programs\Python\Python310\python.exe with env variables count 55
info 23:30:4.335: Process Execution: > ~\AppData\Local\Programs\Python\Python310\python.exe -m vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_interrupt_daemon -v --ppid 14224
> ~\AppData\Local\Programs\Python\Python310\python.exe -m vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_interrupt_daemon -v --ppid 14224
info 23:30:4.510: get interrupthandle daemon
info 23:30:4.515: Process Execution: > ~\AppData\Local\Programs\Python\Python310\python.exe -m ipykernel_launcher --ip=127.0.0.1 --stdin=9003 --control=9001 --hb=9000 --Session.signature_scheme="hmac-sha256" --Session.key=b"5023b083-f8f6-40ee-8e62-d3df43dcc2ee" --shell=9002 --transport="tcp" --iopub=9004 --f=c:\Users\mdirf\AppData\Roaming\jupyter\runtime\kernel-v2-14224TzO4bNjq7NLC.json
> ~\AppData\Local\Programs\Python\Python310\python.exe -m ipykernel_launcher --ip=127.0.0.1 --stdin=9003 --control=9001 --hb=9000 --Session.signature_scheme="hmac-sha256" --Session.key=b"5023b083-f8f6-40ee-8e62-d3df43dcc2ee" --shell=9002 --transport="tcp" --iopub=9004 --f=c:\Users\mdirf\AppData\Roaming\jupyter\runtime\kernel-v2-14224TzO4bNjq7NLC.json
info 23:30:4.515: Process Execution: cwd: ~\codev\JobPractices
cwd: ~\codev\JobPractices
info 23:30:4.555: Preferred Remote kernel for c:\Users\mdirf\codev\JobPractices\main.ipynb is undefined
info 23:30:4.713: ipykernel version 6.15.1 for c:\Users\mdirf\AppData\Local\Programs\Python\Python310\python.exe
info 23:30:4.713: ipykernel location ~\AppData\Local\Programs\Python\Python310\lib\site-packages\ipykernel\__init__.py for c:\Users\mdirf\AppData\Local\Programs\Python\Python310\python.exe
warn 23:30:5.394: StdErr from Kernel Process c:\Users\mdirf\AppData\Local\Programs\Python\Python310\lib\site-packages\traitlets\traitlets.py:2392: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'hmac-sha256' instead of '"hmac-sha256"' if you require traitlets >=5.
  warn(

warn 23:30:5.395: StdErr from Kernel Process c:\Users\mdirf\AppData\Local\Programs\Python\Python310\lib\site-packages\traitlets\traitlets.py:2346: FutureWarning: Supporting extra quotes around Bytes is deprecated in traitlets 5.0. Use '5023b083-f8f6-40ee-8e62-d3df43dcc2ee' instead of 'b"5023b083-f8f6-40ee-8e62-d3df43dcc2ee"'.
  warn(

info 23:30:5.438: Kernel Output: NOTE: When using the `ipython kernel` entry point, Ctrl-C will not work.

To exit, you will have to explicitly quit this process, by either sending
"quit" from a client, or using Ctrl-\ in UNIX-like environments.

To read more about this, see https://github.com/ipython/ipython/issues/2049

To connect another client to this kernel, use:
    --existing c:\Users\mdirf\AppData\Roaming\jupyter\runtime\kernel-v2-14224TzO4bNjq7NLC.json

info 23:30:5.626: Started kernel Python 3.10.6 64-bit., (Raw session started and connected)
info 23:30:5.627: Finished connecting 9340c77d-7d04-4b0a-bf2e-b8ff3e69d8f0
info 23:30:5.629: UpdateWorkingDirectoryAndPath in Kernel
info 23:30:5.630: Executing silently Code (idle) = import os\nimport sys\n%cd "c:\Users\mdirf\codev\JobPractices"\nif os.getcwd() not in sys.path:\nsys
info 23:30:5.747: Widget Message: Received IPyWidgetMessages.IPyWidgets_IsReadyRequest
info 23:30:5.779: Executing silently Code (completed) = import os\nimport sys\n%cd "c:\Users\mdirf\codev\JobPractices"\nif os.getcwd() not in sys.path:\nsys with 1 output(s)
info 23:30:5.779: Waiting for idle on (kernel): 567f8ce3-9166-4feb-8411-11c124ec922e -> idle
info 23:30:5.780: Finished waiting for idle on (kernel): 567f8ce3-9166-4feb-8411-11c124ec922e -> idle
info 23:30:5.786: Process Execution: > ~\AppData\Local\Programs\Python\Python310\python.exe ~\.vscode\extensions\ms-toolsai.jupyter-2022.7.1102252217\pythonFiles\printJupyterDataDir.py
> ~\AppData\Local\Programs\Python\Python310\python.exe ~\.vscode\extensions\ms-toolsai.jupyter-2022.7.1102252217\pythonFiles\printJupyterDataDir.py
info 23:30:5.806: Widget Message: Received IPyWidgets_kernelOptions in ScriptManager
info 23:30:5.806: Widget Message: Received IPyWidgetMessages.IPyWidgets_kernelOptions
warn 23:30:5.839: Got a non-existent Jupyer Data Dir file:///c%3A/Users/mdirf/AppData/Roaming/Python/share/jupyter
info 23:30:5.845: Widget Message: data-base-url set to https://file%2B.vscode-resource.vscode-cdn.net/c%3A/Users/mdirf/.vscode/extensions/ms-toolsai.jupyter-2022.7.1102252217/tmp/scripts/8da607c466ae1390ac0f9ec1745b8d214835ad610540ead34284dd8d85c5d0f7/jupyter
info 23:30:54.771: Loading webview. View is notset
info 23:30:54.772: Loading web view...
info 23:30:54.772: Webview panel created.
info 23:30:55.3: Web view react rendered
info 23:30:55.27: Executing silently Code (idle) = def _VSCODE_getVariable(what_to_get, is_debugging, *args):\n# Query Jupyter server for the info
info 23:30:55.28: Executing silently Code (idle) = def _VSCODE_getVariable(what_to_get, is_debugging, *args):\n# Query Jupyter server for the info
info 23:30:55.51: Executing silently Code (completed) = def _VSCODE_getVariable(what_to_get, is_debugging, *args):\n# Query Jupyter server for the info with 1 output(s)
info 23:30:55.67: Executing silently Code (completed) = def _VSCODE_getVariable(what_to_get, is_debugging, *args):\n# Query Jupyter server for the info with 1 output(s)

Coding Language and Runtime Version

Python v3.10.6

Language Extension Version (if applicable)

No response

Anaconda Version (if applicable)

No response

Running Jupyter locally or remotely?

Local

IanMatthewHuff commented 2 years ago

Question, from the log there it looks like the Pylance extension might not be installed on your machine. Could you try this scenario with both Jupyter and the Pylance extension installed?

irfan7junior commented 2 years ago

thanks a lot, @IanMatthewHuff, it worked. You can close the issue now.