I am trying to run a VPython animation from within a Jupyter environment—the actual codes are on another shared computer that I connect to remotely through Jupyter.
VPython has worked fine for me in Jupyter in the past, but it was recently updated to VPython 7.6.1. The notebook kernel was also updated to Python 3.5.
When I try to execute my VPython script, it hangs forever. When I interrupt the kernel to diagnose the problem, I see this:
~/.local/lib/python3.5/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
So, it seems to me that the WebSocket connection is failing, so the code waits forever. I'm not really knowledgeable enough to know quite what that means or how to fix it, so any help is appreciated.