microsoft / vscode-jupyter

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

Native Notebooks - Cell output is rendered twice #4222

Closed KiruyaMomochi closed 3 years ago

KiruyaMomochi commented 3 years ago

Environment data

Expected behaviour

The desired output is printed only once.

Actual behaviour

The desired output is printed twice (double/duplicated output).

Steps to reproduce

  1. Open Command Pattle, run command Jupyter: Create New Blank Jupyter Notebook.
  2. After the new notebook is opened, type something like 123 then press Shift + Enter. (Make sure you're using Native Notebook Editor)
  3. You can see the output is 123123, which should be 123 only.

image

Logs

Output for Jupyter in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Jupyter)

```log 使用者屬於 "NativeNotebookEditor" 實驗性群組 (TRANSLATE: User is in the "NativeNotebookEditor" expermential group) > c:\Users\xtyzw\Projects\d2l\d2l\Scripts\python.exe c:\Users\xtyzw\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py -c "import notebook" > c:\Users\xtyzw\Projects\d2l\d2l\Scripts\python.exe c:\Users\xtyzw\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py -c "import jupyter" > c:\Users\xtyzw\Projects\d2l\d2l\Scripts\python.exe c:\Users\xtyzw\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py jupyter kernelspec --version > c:\Users\xtyzw\Projects\d2l\d2l\Scripts\python.exe c:\Users\xtyzw\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v > c:\Users\xtyzw\Projects\d2l\d2l\Scripts\python.exe c:\Users\xtyzw\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v > c:\Users\xtyzw\Projects\d2l\d2l\Scripts\python.exe c:\Users\xtyzw\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v > dotnet interactive jupyter --default-kernel powershell ~\AppData\Local\Temp\tmp-1856zTmtrY8hNK7u.json cwd: ~\AppData\Local\Programs\Microsoft VS Code Insiders Started kernel .NET (PowerShell) > dotnet interactive jupyter --default-kernel powershell ~\AppData\Local\Temp\tmp-1856sFWXll6dB1I9.json cwd: ~\AppData\Local\Programs\Microsoft VS Code Insiders Error 2020-12-12 13:33:53: Jupyter Kernel Spec not found for a local connection > ~\AppData\Local\Microsoft\WindowsApps\python.exe c:\Users\xtyzw\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_launcher_daemon -v > ~\AppData\Local\Microsoft\WindowsApps\python.exe c:\Users\xtyzw\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_launcher_daemon -v Started kernel Python 3.9.0 64-bit > ~\AppData\Local\Microsoft\WindowsApps\python.exe c:\Users\xtyzw\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_launcher_daemon -v > ~\AppData\Local\Microsoft\WindowsApps\python.exe c:\Users\xtyzw\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_launcher_daemon -v ```

Additional Information

arsdragonfly commented 3 years ago

can confirm

DavidKutu commented 3 years ago

Thank you for the issue @KiruyaMomochi. I've been trying, but I'm not able to reproduce your issue: image

Is it consistent for you? Or does it happen only sometimes?

KiruyaMomochi commented 3 years ago

@DavidKutu

Yes it's consistent for me. I can reproduce the issue now, following the provided steps.

image

DavidKutu commented 3 years ago

@KiruyaMomochi, another dev from the team can also repro consistently. We'll follow the issue on the vscode repo. In the mean time you could use stable if possible.

KiruyaMomochi commented 3 years ago

Fixed. image

gvanrossum commented 3 years ago

Where did you get this version of the extension that doesn't double the output? I still see it, and I'm on VS Code insiders and Jupyter insiders daily (v2020.12.414227025).

DavidKutu commented 3 years ago

Hey Guido, what is your VS Code insiders version? Is it 1.53?

gvanrossum commented 3 years ago

It is, but I just checked for updates and found one, and now things are fixed. So sorry! Should have thought of that before (this is not the first time that happened... :-( )