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

Opening Interactive window results in duplicates in the symbols list (suggestions, autocomplete, ...) #10846

Closed
1 of 2 tasks
hookxs opened this issue Jul 18, 2022 · 9 comments
Closed
1 of 2 tasks
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug interactive-window Impacts interactive window notebook-intellisense Intellisense & other language features in notebook cells for any language verified Verification succeeded

Comments

@hookxs
Copy link

hookxs commented Jul 18, 2022

Applies To

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

What happened?

I start VS code with some python project open, things work fine. I open Interactive window and this also works but all symbols in the project (accesible via eg. autocomplete, "go to symbol", document outline etc) are added again so now their appear twice in all these lists and autocomplete. Also Document outline starts showing extra branch for "jupyter" and "python" (with the same contents). It's a bit annoying. Also persists after closing the Interactive window.

VS Code Version

Version: 1.69.1 (user setup) Commit: b06ae3b2d2dbfe28bca3134cc6be65935cdfea6a Date: 2022-07-12T08:21:24.514Z Electron: 18.3.5 Chromium: 100.0.4896.160 Node.js: 16.13.2 V8: 10.0.139.17-electron.0 OS: Windows_NT x64 10.0.22000

Jupyter Extension Version

v2022.6.1201981810

Jupyter logs

Visual Studio Code (1.69.1, undefined, desktop)
Jupyter Extension Version: 2022.6.1201981810.
Python Extension Version: 2022.10.1.
Workspace folder c:\Users\jdoe\ownCloud\code\training_utils
error 14:15:59.667: Exception while attempting zmq : [Error: The specified module could not be found.
\\?\c:\Users\jdoe\.vscode\extensions\ms-toolsai.jupyter-2022.6.1201981810\out\node_modules\zeromq\prebuilds\win32-x64\electron.napi.node
	at process.func [as dlopen] (node:electron/js2c/asar_bundle:5:1812)
	at Object.Module._extensions..node (node:internal/modules/cjs/loader:1246:18)
	at Object.func [as .node] (node:electron/js2c/asar_bundle:5:1812)
	at Module.load (node:internal/modules/cjs/loader:1035:32)
	at Module._load (node:internal/modules/cjs/loader:876:12)
	at Function.c._load (node:electron/js2c/asar_bundle:5:13343)
	at Function.i._load (c:\Users\jdoe\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:111:32133)
	at Function.v._load (c:\Users\jdoe\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:111:28715)
	at Function.b._load (c:\Users\jdoe\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:106:61601)
	at Module.require (node:internal/modules/cjs/loader:1059:19)
	at p (c:\Users\jdoe\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\loader.js:4:699)
	at load (c:\Users\jdoe\.vscode\extensions\ms-toolsai.jupyter-2022.6.1201981810\out\node_modules\node-gyp-build\index.js:1:628)
	at Object.<anonymous> (c:\Users\jdoe\.vscode\extensions\ms-toolsai.jupyter-2022.6.1201981810\out\node_modules\zeromq\lib\native.js:1:198)
	at Module.u._compile (c:\Users\jdoe\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\loader.js:4:1313)
	at Object.Module._extensions..js (node:internal/modules/cjs/loader:1216:10)
	at Module.load (node:internal/modules/cjs/loader:1035:32)
	at Module._load (node:internal/modules/cjs/loader:876:12)
	at Function.c._load (node:electron/js2c/asar_bundle:5:13343)
	at Function.i._load (c:\Users\jdoe\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:111:32133)
	at Function.v._load (c:\Users\jdoe\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:111:28715)
	at Function.b._load (c:\Users\jdoe\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:106:61601)
	at Module.require (node:internal/modules/cjs/loader:1059:19)
	at p (c:\Users\jdoe\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\loader.js:4:699)
	at Object.<anonymous> (c:\Users\jdoe\.vscode\extensions\ms-toolsai.jupyter-2022.6.1201981810\out\node_modules\zeromq\lib\index.js:1:144)
	at Module.u._compile (c:\Users\jdoe\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\loader.js:4:1313)
	at Object.Module._extensions..js (node:internal/modules/cjs/loader:1216:10)
	at Module.load (node:internal/modules/cjs/loader:1035:32)
	at Module._load (node:internal/modules/cjs/loader:876:12)
	at Function.c._load (node:electron/js2c/asar_bundle:5:13343)
	at Function.i._load (c:\Users\jdoe\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:111:32133)
	at Function.v._load (c:\Users\jdoe\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:111:28715)
	at Function.b._load (c:\Users\jdoe\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:106:61601)
	at Module.require (node:internal/modules/cjs/loader:1059:19)
	at p (c:\Users\jdoe\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\loader.js:4:699)
	at Object.92747 (c:\Users\jdoe\.vscode\extensions\ms-toolsai.jupyter-2022.6.1201981810\out\extension.node.js:39:361303)
	at __webpack_require__ (c:\Users\jdoe\.vscode\extensions\ms-toolsai.jupyter-2022.6.1201981810\out\extension.node.js:39:1151770)
	at l.zmqSupported (c:\Users\jdoe\.vscode\extensions\ms-toolsai.jupyter-2022.6.1201981810\out\extension.node.js:24:253757)
	at l.isSupportedForLocalLaunch (c:\Users\jdoe\.vscode\extensions\ms-toolsai.jupyter-2022.6.1201981810\out\extension.node.js:24:253500)
	at l.get isSupported [as isSupported] (c:\Users\jdoe\.vscode\extensions\ms-toolsai.jupyter-2022.6.1201981810\out\extension.node.js:24:253410)
	at t.registerTypes (c:\Users\jdoe\.vscode\extensions\ms-toolsai.jupyter-2022.6.1201981810\out\extension.node.js:24:268208)
	at c:\Users\jdoe\.vscode\extensions\ms-toolsai.jupyter-2022.6.1201981810\out\extension.node.js:39:1157232
	at c:\Users\jdoe\.vscode\extensions\ms-toolsai.jupyter-2022.6.1201981810\out\extension.node.js:39:1157985
	at c:\Users\jdoe\.vscode\extensions\ms-toolsai.jupyter-2022.6.1201981810\out\extension.node.js:39:1157993
	at e.activate (c:\Users\jdoe\.vscode\extensions\ms-toolsai.jupyter-2022.6.1201981810\out\extension.node.js:39:1158115)
	at Function._callActivateOptional (c:\Users\jdoe\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:97:17470)
	at Function._callActivate (c:\Users\jdoe\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:97:17131)
	at c:\Users\jdoe\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:97:14945
	at processTicksAndRejections (node:internal/process/task_queues:96:5)
	at async b._activate (c:\Users\jdoe\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:85:8180)
	at async b._waitForDepsThenActivate (c:\Users\jdoe\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:85:8122)
	at async b._initialize (c:\Users\jdoe\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:85:7486)] {
  code: 'ERR_DLOPEN_FAILED'
}
User belongs to experiment group 'jupyterTest'
User belongs to experiment group 'jupyterEnhancedDataViewer'
info 14:15:59.867: Old kernelSpecs (created by Jupyter Extension) stored in directory C:\Users\jdoe\AppData\Roaming\jupyter\kernels\__old_vscode_kernelspecs
info 14:15:59.874: Attempting to start a server because of preload conditions ...
info 14:15:59.875: LSP Notebooks experiment is disabled -- not in treatment group
info 14:15:59.876: Checking for server existence.
info 14:15:59.876: Checking for server usability.
info 14:15:59.944: Experiment status for python is {"enabled":true,"optInto":[],"optOutFrom":[]}
info 14:16:0.531: Process Execution: > ~\miniconda3\envs\ais\python.exe -m pip list
> ~\miniconda3\envs\ais\python.exe -m pip list
info 14:16:0.533: Process Execution: > ~\miniconda3\envs\mliko\python.exe -c "import jupyter"
> ~\miniconda3\envs\mliko\python.exe -c "import jupyter"
info 14:16:0.535: Process Execution: > ~\miniconda3\envs\mliko\python.exe -c "import notebook"
> ~\miniconda3\envs\mliko\python.exe -c "import notebook"
info 14:16:0.729: Process Execution: > ~\miniconda3\envs\mliko\python.exe -m jupyter kernelspec --version
> ~\miniconda3\envs\mliko\python.exe -m jupyter kernelspec --version
info 14:16:1.93: Starting notebook server.
info 14:16:1.93: Connecting to server
info 14:16:1.93: Launching server
info 14:16:1.94: Starting Notebook
info 14:16:1.98: Generating custom default config at C:\Users\jdoe\AppData\Local\Temp\bbb5ec9d-c96a-4a36-b817-a4f7183f23f0\jupyter_notebook_config.py
info 14:16:1.98: Starting Jupyter Notebook
Starting Jupyter from ~\miniconda3\envs\mliko\python.exe
info 14:16:1.100: Creating daemon pool for c:\Users\jdoe\miniconda3\envs\mliko\python.exe with env variables count 63
info 14:16:1.103: Process Execution: > ~\miniconda3\envs\mliko\python.exe -m vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v --ppid 11040
> ~\miniconda3\envs\mliko\python.exe -m vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v --ppid 11040
info 14:16:1.106: Process Execution: > ~\miniconda3\envs\mliko\python.exe -m vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v --ppid 11040
> ~\miniconda3\envs\mliko\python.exe -m vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v --ppid 11040
info 14:16:1.109: Process Execution: > ~\miniconda3\envs\mliko\python.exe -m vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v --ppid 11040
> ~\miniconda3\envs\mliko\python.exe -m vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v --ppid 11040
info 14:16:1.221: Process Execution: > ~\miniconda3\envs\mliko\python.exe (daemon) -m jupyter notebook --no-browser --notebook-dir="c:\\Users\\jdoe\\ownCloud\\code\\training_utils" --config=C:\Users\jdoe\AppData\Local\Temp\bbb5ec9d-c96a-4a36-b817-a4f7183f23f0\jupyter_notebook_config.py --NotebookApp.iopub_data_rate_limit=10000000000.0
> ~\miniconda3\envs\mliko\python.exe (daemon) -m jupyter notebook --no-browser --notebook-dir="c:\\Users\\jdoe\\ownCloud\\code\\training_utils" --config=C:\Users\jdoe\AppData\Local\Temp\bbb5ec9d-c96a-4a36-b817-a4f7183f23f0\jupyter_notebook_config.py --NotebookApp.iopub_data_rate_limit=10000000000.0
info 14:16:1.221: Waiting for Jupyter Notebook
c:\Users\jdoe\miniconda3\envs\mliko\lib\site-packages\traitlets\traitlets.py:2202: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'c:\\\\Users\\\\jdoe\\\\ownCloud\\\\code\\\\training_utils' instead of '"c:\\\\Users\\\\jdoe\\\\ownCloud\\\\code\\\\training_utils"' if you require traitlets >=5.
  warn(
info 14:16:1.898: c:\Users\jdoe\miniconda3\envs\mliko\lib\site-packages\traitlets\traitlets.py:2202: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'c:\\\\Users\\\\jdoe\\\\ownCloud\\\\code\\\\training_utils' instead of '"c:\\\\Users\\\\jdoe\\\\ownCloud\\\\code\\\\training_utils"' if you require traitlets >=5.
  warn(

[I 14:16:02.377 NotebookApp] Serving notebooks from local directory: c:\\Users\\jdoe\\ownCloud\\code\\training_utils
info 14:16:2.378: c:\Users\jdoe\miniconda3\envs\mliko\lib\site-packages\traitlets\traitlets.py:2202: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'c:\\\\Users\\\\jdoe\\\\ownCloud\\\\code\\\\training_utils' instead of '"c:\\\\Users\\\\jdoe\\\\ownCloud\\\\code\\\\training_utils"' if you require traitlets >=5.
  warn(
[I 14:16:02.377 NotebookApp] Serving notebooks from local directory: c:\\Users\\jdoe\\ownCloud\\code\\training_utils

[I 14:16:02.377 NotebookApp] Jupyter Notebook 6.4.6 is running at:
info 14:16:2.378: c:\Users\jdoe\miniconda3\envs\mliko\lib\site-packages\traitlets\traitlets.py:2202: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'c:\\\\Users\\\\jdoe\\\\ownCloud\\\\code\\\\training_utils' instead of '"c:\\\\Users\\\\jdoe\\\\ownCloud\\\\code\\\\training_utils"' if you require traitlets >=5.
  warn(
[I 14:16:02.377 NotebookApp] Serving notebooks from local directory: c:\\Users\\jdoe\\ownCloud\\code\\training_utils
[I 14:16:02.377 NotebookApp] Jupyter Notebook 6.4.6 is running at:

[I 14:16:02.378 NotebookApp] http:https://localhost:8888/?token=31757372fa30323fdf5f9a33c26277214e9ac8c13b309856
info 14:16:2.378: c:\Users\jdoe\miniconda3\envs\mliko\lib\site-packages\traitlets\traitlets.py:2202: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'c:\\\\Users\\\\jdoe\\\\ownCloud\\\\code\\\\training_utils' instead of '"c:\\\\Users\\\\jdoe\\\\ownCloud\\\\code\\\\training_utils"' if you require traitlets >=5.
  warn(
[I 14:16:02.377 NotebookApp] Serving notebooks from local directory: c:\\Users\\jdoe\\ownCloud\\code\\training_utils
[I 14:16:02.377 NotebookApp] Jupyter Notebook 6.4.6 is running at:
[I 14:16:02.378 NotebookApp] http:https://localhost:8888/?token=31757372fa30323fdf5f9a33c26277214e9ac8c13b309856

info 14:16:2.379: Process Execution: > ~\miniconda3\envs\mliko\python.exe (daemon) ~\.vscode\extensions\ms-toolsai.jupyter-2022.6.1201981810\pythonFiles\vscode_datascience_helpers\getServerInfo.py
> ~\miniconda3\envs\mliko\python.exe (daemon) ~\.vscode\extensions\ms-toolsai.jupyter-2022.6.1201981810\pythonFiles\vscode_datascience_helpers\getServerInfo.py
[I 14:16:02.378 NotebookApp]  or http:https://127.0.0.1:8888/?token=31757372fa30323fdf5f9a33c26277214e9ac8c13b309856
info 14:16:2.380: c:\Users\jdoe\miniconda3\envs\mliko\lib\site-packages\traitlets\traitlets.py:2202: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'c:\\\\Users\\\\jdoe\\\\ownCloud\\\\code\\\\training_utils' instead of '"c:\\\\Users\\\\jdoe\\\\ownCloud\\\\code\\\\training_utils"' if you require traitlets >=5.
  warn(
[I 14:16:02.377 NotebookApp] Serving notebooks from local directory: c:\\Users\\jdoe\\ownCloud\\code\\training_utils
[I 14:16:02.377 NotebookApp] Jupyter Notebook 6.4.6 is running at:
[I 14:16:02.378 NotebookApp] http:https://localhost:8888/?token=31757372fa30323fdf5f9a33c26277214e9ac8c13b309856
[I 14:16:02.378 NotebookApp]  or http:https://127.0.0.1:8888/?token=31757372fa30323fdf5f9a33c26277214e9ac8c13b309856

info 14:16:2.381: Process Execution: > ~\miniconda3\envs\mliko\python.exe (daemon) ~\.vscode\extensions\ms-toolsai.jupyter-2022.6.1201981810\pythonFiles\vscode_datascience_helpers\getServerInfo.py
> ~\miniconda3\envs\mliko\python.exe (daemon) ~\.vscode\extensions\ms-toolsai.jupyter-2022.6.1201981810\pythonFiles\vscode_datascience_helpers\getServerInfo.py
[I 14:16:02.378 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
info 14:16:2.383: c:\Users\jdoe\miniconda3\envs\mliko\lib\site-packages\traitlets\traitlets.py:2202: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'c:\\\\Users\\\\jdoe\\\\ownCloud\\\\code\\\\training_utils' instead of '"c:\\\\Users\\\\jdoe\\\\ownCloud\\\\code\\\\training_utils"' if you require traitlets >=5.
  warn(
[I 14:16:02.377 NotebookApp] Serving notebooks from local directory: c:\\Users\\jdoe\\ownCloud\\code\\training_utils
[I 14:16:02.377 NotebookApp] Jupyter Notebook 6.4.6 is running at:
[I 14:16:02.378 NotebookApp] http:https://localhost:8888/?token=31757372fa30323fdf5f9a33c26277214e9ac8c13b309856
[I 14:16:02.378 NotebookApp]  or http:https://127.0.0.1:8888/?token=31757372fa30323fdf5f9a33c26277214e9ac8c13b309856
[I 14:16:02.378 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).

[C 14:16:02.381 NotebookApp] 
    
    To access the notebook, open this file in a browser:
        file:https:///C:/Users/jdoe/AppData/Roaming/jupyter/runtime/nbserver-12932-open.html
    Or copy and paste one of these URLs:
        http:https://localhost:8888/?token=31757372fa30323fdf5f9a33c26277214e9ac8c13b309856
     or http:https://127.0.0.1:8888/?token=31757372fa30323fdf5f9a33c26277214e9ac8c13b309856
info 14:16:2.384: c:\Users\jdoe\miniconda3\envs\mliko\lib\site-packages\traitlets\traitlets.py:2202: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'c:\\\\Users\\\\jdoe\\\\ownCloud\\\\code\\\\training_utils' instead of '"c:\\\\Users\\\\jdoe\\\\ownCloud\\\\code\\\\training_utils"' if you require traitlets >=5.
  warn(
[I 14:16:02.377 NotebookApp] Serving notebooks from local directory: c:\\Users\\jdoe\\ownCloud\\code\\training_utils
[I 14:16:02.377 NotebookApp] Jupyter Notebook 6.4.6 is running at:
[I 14:16:02.378 NotebookApp] http:https://localhost:8888/?token=31757372fa30323fdf5f9a33c26277214e9ac8c13b309856
[I 14:16:02.378 NotebookApp]  or http:https://127.0.0.1:8888/?token=31757372fa30323fdf5f9a33c26277214e9ac8c13b309856
[I 14:16:02.378 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 14:16:02.381 NotebookApp] 
    
    To access the notebook, open this file in a browser:
        file:https:///C:/Users/jdoe/AppData/Roaming/jupyter/runtime/nbserver-12932-open.html
    Or copy and paste one of these URLs:
        http:https://localhost:8888/?token=31757372fa30323fdf5f9a33c26277214e9ac8c13b309856
     or http:https://127.0.0.1:8888/?token=31757372fa30323fdf5f9a33c26277214e9ac8c13b309856

info 14:16:2.759: Connecting to process server
info 14:16:2.759: Connecting server kernel http:https://localhost:8888/
info 14:16:2.759: Creating server with url : http:https://localhost:8888/
info 14:16:2.778: Connection complete server
info 14:16:2.778: Server started.
info 14:16:2.831: Process Execution: > ~\miniconda3\envs\mliko\python.exe (daemon) ~\.vscode\extensions\ms-toolsai.jupyter-2022.6.1201981810\pythonFiles\vscode_datascience_helpers\getServerInfo.py
> ~\miniconda3\envs\mliko\python.exe (daemon) ~\.vscode\extensions\ms-toolsai.jupyter-2022.6.1201981810\pythonFiles\vscode_datascience_helpers\getServerInfo.py
info 14:16:2.893: Process Execution: > ~\miniconda3\envs\mliko\python.exe (daemon) ~\.vscode\extensions\ms-toolsai.jupyter-2022.6.1201981810\pythonFiles\vscode_datascience_helpers\getServerInfo.py
> ~\miniconda3\envs\mliko\python.exe (daemon) ~\.vscode\extensions\ms-toolsai.jupyter-2022.6.1201981810\pythonFiles\vscode_datascience_helpers\getServerInfo.py
warn 14:16:3.412: Falling back to Python Execution Service due to failure in daemon [h [Error]: Failed to execute using the daemon, Traceback (most recent call last):
  File "c:\Users\jdoe\.vscode\extensions\ms-toolsai.jupyter-2022.6.1201981810\pythonFiles\vscode_datascience_helpers\getServerInfo.py", line 19, in <module>
    for si in server_list:
  File "c:\Users\jdoe\miniconda3\envs\mliko\lib\site-packages\notebook\notebookapp.py", line 2414, in list_running_servers
    with io.open(os.path.join(runtime_dir, file_name), encoding='utf-8') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\jdoe\\AppData\\Roaming\\jupyter\\runtime\\nbserver-10032.json'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\Users\jdoe\.vscode\extensions\ms-toolsai.jupyter-2022.6.1201981810\pythonFiles\vscode_datascience_helpers\daemon\daemon_python.py", line 54, in _decorator
    return func(self, *args, **kwargs)
  File "c:\Users\jdoe\.vscode\extensions\ms-toolsai.jupyter-2022.6.1201981810\pythonFiles\vscode_datascience_helpers\daemon\daemon_python.py", line 135, in m_exec_file
    return self._execute_and_capture_output(exec_file)
  File "c:\Users\jdoe\.vscode\extensions\ms-toolsai.jupyter-2022.6.1201981810\pythonFiles\vscode_datascience_helpers\daemon\daemon_python.py", line 106, in _execute_and_capture_output
    func()
  File "c:\Users\jdoe\.vscode\extensions\ms-toolsai.jupyter-2022.6.1201981810\pythonFiles\vscode_datascience_helpers\daemon\daemon_python.py", line 132, in exec_file
    runpy.run_path(file_name, globals())
  File "c:\Users\jdoe\miniconda3\envs\mliko\lib\runpy.py", line 268, in run_path
    return _run_module_code(code, init_globals, run_name,
  File "c:\Users\jdoe\miniconda3\envs\mliko\lib\runpy.py", line 97, in _run_module_code
    _run_code(code, mod_globals, init_globals,
  File "c:\Users\jdoe\miniconda3\envs\mliko\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "c:\Users\jdoe\.vscode\extensions\ms-toolsai.jupyter-2022.6.1201981810\pythonFiles\vscode_datascience_helpers\getServerInfo.py", line 46, in <module>
    builtins.print.write(result.stdout.decode(encoding))
AttributeError: 'builtin_function_or_method' object has no attribute 'write'

	at a.processResponse (c:\Users\jdoe\.vscode\extensions\ms-toolsai.jupyter-2022.6.1201981810\out\extension.node.js:29:30336)
	at a.execFileWithDaemon (c:\Users\jdoe\.vscode\extensions\ms-toolsai.jupyter-2022.6.1201981810\out\extension.node.js:29:30683)
	at async a.exec (c:\Users\jdoe\.vscode\extensions\ms-toolsai.jupyter-2022.6.1201981810\out\extension.node.js:29:27728)
	at async d.wrapCall (c:\Users\jdoe\.vscode\extensions\ms-toolsai.jupyter-2022.6.1201981810\out\extension.node.js:29:71563)
	at async E.getRunningJupyterServers (c:\Users\jdoe\.vscode\extensions\ms-toolsai.jupyter-2022.6.1201981810\out\extension.node.js:24:36270)] {
  category: 'daemon'
}
info 14:16:3.414: Process Execution: > ~\miniconda3\envs\mliko\python.exe ~\.vscode\extensions\ms-toolsai.jupyter-2022.6.1201981810\pythonFiles\vscode_datascience_helpers\getServerInfo.py
> ~\miniconda3\envs\mliko\python.exe ~\.vscode\extensions\ms-toolsai.jupyter-2022.6.1201981810\pythonFiles\vscode_datascience_helpers\getServerInfo.py
info 14:16:5.919: Starting interactive window for resource ''
info 14:16:6.8: Attempting to start a server because of preload conditions ...
info 14:16:6.15: Preferred Remote kernel for Interactive-1.interactive is undefined
info 14:16:6.116: Starting Jupyter Session id = 'startUsingPythonInterpreter:.jvsc74a57bd001e2abf9ecdc39552c488084409e12805b5756f98a1fafb8b56a4943cd82a42b.c:\Users\jdoe\miniconda3\envs\ais\python.exe.c:\Users\jdoe\miniconda3\envs\ais\python.exe.-m#ipykernel_launcher' (Python Path: c:\Users\jdoe\miniconda3\envs\ais, EnvType: Conda, EnvName: 'ais', Version: 3.9.9) for 'Interactive-1.interactive' (disableUI=false)
[I 14:16:06.122 NotebookApp] Creating new notebook in 
info 14:16:6.154: installMissingDependencies c:\Users\jdoe\miniconda3\envs\ais\python.exe, ui.disabled=false for resource ''
info 14:16:6.158: Process Execution: > ~\miniconda3\envs\ais\python.exe -c "import ipykernel"
> ~\miniconda3\envs\ais\python.exe -c "import ipykernel"
info 14:16:6.335: Registering dummy command feature
info 14:16:6.464: Spec argv[0] updated from 'c:\Users\jdoe\miniconda3\envs\ais\python.exe' to 'c:\Users\jdoe\miniconda3\envs\ais\python.exe'
[I 14:16:06.535 NotebookApp] Kernel started: 3f98a6c9-844e-447c-816f-24413b9766f8, name: python399jvsc74a57bd001e2abf9ecdc39552c488084409e12805b5756f98a1fafb8b56a4943cd82a42b
info 14:16:6.543: Waiting for idle on (kernel): 3f98a6c9-844e-447c-816f-24413b9766f8 -> unknown
[W 14:16:06.549 NotebookApp] delete /default-jvsc-48500438-7998-4806-905e-a0c7af6c8632a1f9f552-8502-4c3f-9a26-f3914370f400.ipynb
info 14:16:7.564: Finished waiting for idle on (kernel): 3f98a6c9-844e-447c-816f-24413b9766f8 -> idle
info 14:16:7.565: Started session for kernel startUsingPythonInterpreter:.jvsc74a57bd001e2abf9ecdc39552c488084409e12805b5756f98a1fafb8b56a4943cd82a42b.c:\Users\jdoe\miniconda3\envs\ais\python.exe.c:\Users\jdoe\miniconda3\envs\ais\python.exe.-m#ipykernel_launcher
info 14:16:7.565: Finished connecting kernel startUsingPythonInterpreter:.jvsc74a57bd001e2abf9ecdc39552c488084409e12805b5756f98a1fafb8b56a4943cd82a42b.c:\Users\jdoe\miniconda3\envs\ais\python.exe.c:\Users\jdoe\miniconda3\envs\ais\python.exe.-m#ipykernel_launcher
info 14:16:7.567: Executing silently Code (idle) = import types as _VSCODE_types\nimport os\nimport hashlib as _VSCODE_hashlib\nfrom IPython import get_ip
info 14:16:7.601: Executing silently Code (completed) = import types as _VSCODE_types\nimport os\nimport hashlib as _VSCODE_hashlib\nfrom IPython import get_ip with 0 output(s)
info 14:16:7.602: Waiting for idle on (kernel): 3f98a6c9-844e-447c-816f-24413b9766f8 -> idle
info 14:16:7.602: Finished waiting for idle on (kernel): 3f98a6c9-844e-447c-816f-24413b9766f8 -> idle
info 14:16:7.622: Widget Message: Received IPyWidgets_kernelOptions in ScriptManager
info 14:16:7.636: Widget Message: Received IPyWidgetMessages.IPyWidgets_kernelOptions
info 14:16:7.663: Widget Message: data-base-url set to https://file%2B.vscode-resource.vscode-cdn.net/c%3A/Users/jdoe/.vscode/extensions/ms-toolsai.jupyter-2022.6.1201981810/tmp/scripts/e576c883f5b0b02e4cdbb895d606ecfcd003f66bdfb40fcdb0f4dabc83032550/jupyter
info 14:16:13.937: Disposing kernel .jvsc74a57bd001e2abf9ecdc39552c488084409e12805b5756f98a1fafb8b56a4943cd82a42b.c:\Users\jdoe\miniconda3\envs\ais\python.exe.c:\Users\jdoe\miniconda3\envs\ais\python.exe.-m#ipykernel_launcher for notebook Interactive-1.interactive due to selection of another kernel or closing of the notebook
info 14:16:13.938: Dispose Kernel 'Interactive-1.interactive' associated with ''
info 14:16:13.940: Dispose Kernel 'Interactive-1.interactive' associated with ''
[I 14:16:13.945 NotebookApp] Kernel shutdown: 3f98a6c9-844e-447c-816f-24413b9766f8

Coding Language and Runtime Version

No response

Language Extension Version (if applicable)

No response

Anaconda Version (if applicable)

No response

Running Jupyter locally or remotely?

Local

@hookxs hookxs added bug Issue identified by VS Code Team member as probable bug triage-needed Issue needs to be triaged labels Jul 18, 2022
@rebornix rebornix added the interactive-window Impacts interactive window label Jul 18, 2022
@greazer greazer removed the triage-needed Issue needs to be triaged label Jul 25, 2022
@DonJayamanne
Copy link
Contributor

Thanks for filing this issue,
please could you send a screenshot of the following two:

  • duplicates in document outline etc) are added again so now their appear twice in all these lists and autocomplete. Also Document outline starts showing extra branch for "jupyter" and "python" (with the same contents). It's a bit annoying. Also persists after closing the Interactive window.

@DonJayamanne DonJayamanne added the info-needed Issue requires more information from poster label Jul 25, 2022
@hookxs
Copy link
Author

hookxs commented Jul 27, 2022

Sorry for the delay. Here are the requested screenshots.

Intellisense and editor outline before I open the interactive window (ie after VS code start and Python extension start):
suggestions_before
outline_before

The same after opening (and possibly closing) the python interactive window:
suggestions_after
outline_after

@hookxs
Copy link
Author

hookxs commented Jul 28, 2022

I just want to add: this does not apply only to locally-defined symbols, the same happens if I start typing numpy. and all suggestions will be twice. Also, this applies to "popups" that appear when mouse hovers over symbol (some description etc), see screenshot (here mouse is over out_val but the line is unreachable). This all works fine until I open the interactive window. As soon as I open it (regardless if I use it or close immediately), everything starts showing twice as descibed.
image

@DonJayamanne
Copy link
Contributor

DonJayamanne commented Aug 2, 2022

Thanks, I can replicate this at my end as well.
Repro steps:

  • Open python file with cells
  • write the code
import sys
sys.
  • We get duplicates for sys.

@DonJayamanne DonJayamanne removed their assignment Aug 2, 2022
@DonJayamanne DonJayamanne removed the info-needed Issue requires more information from poster label Aug 2, 2022
@amunger amunger added the notebook-intellisense Intellisense & other language features in notebook cells for any language label Aug 12, 2022
@IanMatthewHuff
Copy link
Member

@amunger Think this is your area due to IW. But if this is a general language server issue go ahead and move to me.

@amunger amunger added this to the September 2022 milestone Aug 31, 2022
@hookxs
Copy link
Author

hookxs commented Sep 6, 2022

I no longer have this issue after one of the latest vs code updates. Thanks.

@torext
Copy link

torext commented Sep 15, 2022

I still seem to have such an issue in notebooks, see microsoft/pylance-release#3017 (comment)

@IanMatthewHuff
Copy link
Member

@torext I think that tracking #11038 is the right issue to follow to track a fix for this. Should be the same issue.

@mjbvz mjbvz added the verified Verification succeeded label Sep 29, 2022
@torext
Copy link

torext commented Nov 4, 2022

Seeing this issue again exactly as described in #10846 (comment), running VS Code 1.73.0 and the following related extensions:

Name: Jupyter
Id: ms-toolsai.jupyter
Description: Jupyter notebook support, interactive programming and computing that supports Intellisense, debugging and more.
Version: 2022.9.1202862440
Publisher: Microsoft
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter

Name: Pylance
Id: ms-python.vscode-pylance
Description: A performant, feature-rich language server for Python in VS Code
Version: 2022.11.10
Publisher: Microsoft
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=ms-python.vscode-pylance

Name: Python
Id: ms-python.python
Description: IntelliSense (Pylance), Linting, Debugging (multi-threaded, remote), Jupyter Notebooks, code formatting, refactoring, unit tests, and more.
Version: 2022.18.1
Publisher: Microsoft
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=ms-python.python

EDIT: According to #11938 (comment) this is probably fixed in the pre-release version of the Jupyter extension. Switching to that one indeed fixes it for me.

@Brainor Brainor mentioned this issue Nov 25, 2022
2 tasks
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 23, 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 notebook-intellisense Intellisense & other language features in notebook cells for any language verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

8 participants