-
Notifications
You must be signed in to change notification settings - Fork 63
Description
Hello,
For a third year undergraduate course we are running JupyterHub 1.3.0 which is configured to serve up JupyterLab 3.0.9 by default. The Python version is 3.8.8 and VPython is at 7.6.1. Everything has been installed via conda
.
Starting a new notebook in JupyterLab and running the MWE of:
from vpython import *
scene = canvas()
sphere()
results in the first cell executing fine and the second cell hung on [*]
with no output. When I interrupt the kernel I see
/opt/conda/lib/python3.8/site-packages/vpython/with_notebook.py in <module>
151 baseObj.glow = GlowWidget(wsport=__SOCKET_PORT, wsuri='/ws')
152 while (not wsConnected):
--> 153 time.sleep(0.1) # wait for websocket to connect
154
155 baseObj.trigger() # start the trigger ping-pong process
which is similar to what is described in this thread: https://groups.google.com/g/vpython-users/c/yd1aO79mdV0?pli=1
We tried the fix in the last post of that thread to no avail.
I understand that this issue was supposed to be resolved for non-localhost type setups (like JupyterHub or Binder) as per #28.
Interestingly, if we start in Classic notebook by replacing /lab
in the URL with /tree
, or using the “Launch Classic Notebook” item in JupyterLab’s Help menu, the MWE works perfectly fine.
So it seems to be the combination of JupyterLab and JupyterHub that's preventing the opening of the websocket.