nir / jupylet

Python game programming in Jupyter notebooks.
https://jupylet.readthedocs.io
BSD 2-Clause "Simplified" License
230 stars 22 forks source link

ipykernel_launcher error in vscode .ipynb cell #33

Closed Fusyong closed 3 years ago

Fusyong commented 3 years ago

When I run the cells of 02-hello-jupylet.ipynb or of the other files from the examples, in VSCode in .ipynb model, on Win10 with Python 3.9, and get error in cell of app = App(width=320, height=64):

usage: ipykernel_launcher [-h] [--window {pyglet,glfw}]
                          [--log_level {DEBUG,INFO,WARNING,ERROR}]
ipykernel_launcher: error: unrecognized arguments: --ip=127.0.0.1 --stdin=9013 --control=9011 --hb=9010 --Session.signature_scheme="hmac-sha256" --Session.key=b"5601a025-9f20-4b88-afbb-44baf429e64a" --shell=9012 --transport="tcp" --iopub=9014 --f=C:\Users\ah21\AppData\Local\Temp\tmp-10760RJVa1Rf2n20M.json
SystemExit: 2
An exception has occurred, use %tb to see the full traceback.

SystemExit: 2
D:\venvs\jupylet\lib\site-packages\IPython\core\interactiveshell.py:3449: UserWarning: To exit: use 'exit', 'quit', or Ctrl-D.
  warn("To exit: use 'exit', 'quit', or Ctrl-D.", stacklevel=1)
nir commented 3 years ago

The App() object does argument parsing. It seems it interferes with vscode's way of launching ipykernels.

I did not test or intend jupylet to be compatible with vscode notebooks.

To work in vscode notebooks they must support ipywidgets and ipyevents.

I see that they recently added support for ipywidgets.

Do you know happen to know if they support the ipyevents plugin?

Fusyong commented 3 years ago

I found out a dependency fault through pip freeze > requirements.txt and reinstall by the requirements.txt. I made a new venv and it work. Thanks.