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

%matplotlib widget infinite loop and running #4203

Closed
eskemojoe007 opened this issue Dec 10, 2020 · 3 comments
Closed

%matplotlib widget infinite loop and running #4203

eskemojoe007 opened this issue Dec 10, 2020 · 3 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug

Comments

@eskemojoe007
Copy link

eskemojoe007 commented Dec 10, 2020

Environment data

  • VS Code version: 1.51.1
  • Jupyter Extension version (available under the Extensions sidebar): 2020.12.411183155
  • Python Extension version (available under the Extensions sidebar): 2020.11.371526539
  • OS (Windows | Mac | Linux distro) and version: Windows 10 Enterprise
  • Python and/or Anaconda version: Python 3.8.6
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): N/A
  • Jupyter server running: Local
  • ipympl version: 0.5.8 (with restart already applied)

Expected behaviour

Using ipympl and %matplotlib widget to plot within a widget for zoom and other functionality from a standar python file using sections such as # %%

Actual behaviour

Infinite executuion of the cell
image

Steps to reproduce:

main.py

# %%
import matplotlib.pyplot as plt
%matplotlib widget
plt.plot([1,2,3,4],[1,2,3,4])

Running with jupyter: run current cell

Note: This works when in a native notebook, just not in a python standard python file

Logs

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

> ~\AppData\Local\Programs\Python\Python38\python.exe c:\Users\USERNAME\.vscode\extensions\ms-toolsai.jupyter-2020.12.411183155\pythonFiles\pyvsc-run-isolated.py -c "import jupyter"
> ~\AppData\Local\Programs\Python\Python38\python.exe c:\Users\USERNAME\.vscode\extensions\ms-toolsai.jupyter-2020.12.411183155\pythonFiles\pyvsc-run-isolated.py -c "import jupyter"
> ~\AppData\Local\Programs\Python\Python38\python.exe c:\Users\USERNAME\.vscode\extensions\ms-toolsai.jupyter-2020.12.411183155\pythonFiles\pyvsc-run-isolated.py -c "import notebook"
> ~\AppData\Local\Programs\Python\Python38\python.exe c:\Users\USERNAME\.vscode\extensions\ms-toolsai.jupyter-2020.12.411183155\pythonFiles\pyvsc-run-isolated.py -c "import notebook"
> ~\AppData\Local\Programs\Python\Python38\python.exe c:\Users\USERNAME\.vscode\extensions\ms-toolsai.jupyter-2020.12.411183155\pythonFiles\pyvsc-run-isolated.py jupyter kernelspec --version
> ~\AppData\Local\Programs\Python\Python38\python.exe c:\Users\USERNAME\.vscode\extensions\ms-toolsai.jupyter-2020.12.411183155\pythonFiles\pyvsc-run-isolated.py jupyter kernelspec --version
> ~\AppData\Local\Programs\Python\Python38\python.exe -c "import os;print(os.path.realpath("C:\\Users\\USERNAME\\AppData\\Roaming\\jupyter\\kernels"))"
> ~\AppData\Local\Programs\Python\Python38\python.exe -c "import os;print(os.path.realpath("C:\\Users\\USERNAME\\AppData\\Roaming\\jupyter\\kernels"))"
> ~\AppData\Local\Programs\Python\Python38\python.exe c:\Users\USERNAME\.vscode\extensions\ms-toolsai.jupyter-2020.12.411183155\pythonFiles\pyvsc-run-isolated.py -c "import ipykernel"
> ~\AppData\Local\Programs\Python\Python38\python.exe c:\Users\USERNAME\.vscode\extensions\ms-toolsai.jupyter-2020.12.411183155\pythonFiles\pyvsc-run-isolated.py -c "import ipykernel"
> ~\AppData\Local\Programs\Python\Python38\python.exe c:\Users\USERNAME\.vscode\extensions\ms-toolsai.jupyter-2020.12.411183155\pythonFiles\pyvsc-run-isolated.py -c "import ipykernel"
> ~\AppData\Local\Programs\Python\Python38\python.exe c:\Users\USERNAME\.vscode\extensions\ms-toolsai.jupyter-2020.12.411183155\pythonFiles\pyvsc-run-isolated.py -c "import ipykernel"
Error 2020-12-10 14:08:56: Jupyter Kernel Spec not found for a local connection
> ~\AppData\Local\Programs\Python\Python38\python.exe c:\Users\USERNAME\.vscode\extensions\ms-toolsai.jupyter-2020.12.411183155\pythonFiles\pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_launcher_daemon -v
> ~\AppData\Local\Programs\Python\Python38\python.exe c:\Users\USERNAME\.vscode\extensions\ms-toolsai.jupyter-2020.12.411183155\pythonFiles\pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_launcher_daemon -v
> ~\AppData\Local\Programs\Python\Python38\python.exe c:\Users\USERNAME\.vscode\extensions\ms-toolsai.jupyter-2020.12.411183155\pythonFiles\pyvsc-run-isolated.py -c "import ipykernel"
> ~\AppData\Local\Programs\Python\Python38\python.exe c:\Users\USERNAME\.vscode\extensions\ms-toolsai.jupyter-2020.12.411183155\pythonFiles\pyvsc-run-isolated.py -c "import ipykernel"
> ~\AppData\Local\Programs\Python\Python38\python.exe c:\Users\USERNAME\.vscode\extensions\ms-toolsai.jupyter-2020.12.411183155\pythonFiles\pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_launcher_daemon -v
> ~\AppData\Local\Programs\Python\Python38\python.exe c:\Users\USERNAME\.vscode\extensions\ms-toolsai.jupyter-2020.12.411183155\pythonFiles\pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_launcher_daemon -v
Started kernel Python 3.8.6 64-bit
> ~\AppData\Local\Programs\Python\Python38\python.exe c:\Users\USERNAME\.vscode\extensions\ms-toolsai.jupyter-2020.12.411183155\pythonFiles\pyvsc-run-isolated.py -c "import ipykernel"
> ~\AppData\Local\Programs\Python\Python38\python.exe c:\Users\USERNAME\.vscode\extensions\ms-toolsai.jupyter-2020.12.411183155\pythonFiles\pyvsc-run-isolated.py -c "import ipykernel"
> ~\AppData\Local\Programs\Python\Python38\python.exe c:\Users\USERNAME\.vscode\extensions\ms-toolsai.jupyter-2020.12.411183155\pythonFiles\pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_launcher_daemon -v
> ~\AppData\Local\Programs\Python\Python38\python.exe c:\Users\USERNAME\.vscode\extensions\ms-toolsai.jupyter-2020.12.411183155\pythonFiles\pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_launcher_daemon -v

@eskemojoe007 eskemojoe007 added the bug Issue identified by VS Code Team member as probable bug label Dec 10, 2020
@DonJayamanne
Copy link
Contributor

DonJayamanne commented Dec 10, 2020

Thanks for reporting this issue, I can replicate this at my end.

@DonJayamanne
Copy link
Contributor

@eskemojoe007 We have resolved this issue and published a new version of the extension with the fix.
Please update the Jupyter extension.

@eskemojoe007
Copy link
Author

Confirmed that it now works. Thanks for the speedy work ya'll.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 6, 2021
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
Projects
None yet
Development

No branches or pull requests

2 participants