Closed MatthiasJ1 closed 2 months ago
This may or may not be related but I did not have the Jupyter vsCode extension installed, although this was not an issue in 2.2.2
I saw this when running the unit tests, but it didn't happen when running in VSCode. I'll try to reproduce
Found the problem. I remove closing websockets after each call (saves up to a second). However, is a big issue at the end. Need to see what I can do. Uncomment the following lines and it should behave like before:
This feels like a hack but it may solve the issue: https://docs.python.org/3/library/atexit.html
I'll start with trying to fix the thread thing as mentioned above. But if that doesnt work, atexit is a good next step 😀
pip install --upgrade git+https://github.com/python-websockets/websockets.git@f0398141d2efd28f64d8e1d6d9adc179a9e5e334
This commit (from last week) fixes the issue. Need to check whether websockets 12.0 is compatible. But this would be the easiest fix
btw. atexit
fails, since the program is waiting for the thread => no exit happens 😀
@MatthiasJ1 Could you maybe try the the pip installation of websockets on your machine? pip will complain tht ocp_vscode wants websockets 11, but that can be ignored. For me it solves the problem
Installing the latest released version of websockets does not fix the issue but installing the dev version from github does.
arrg, pypi doesn't allow direct links as dependencies. So, can't package this simple fix. Need to find another way
Should be fixed with v2.3.2
Sorry for the late reply, just confirming that it is fixed for me. Thanks for looking into this.
Pip package version: 2.3.1 vsCode extension version: v2.3.1
If I run the following file in vsCode:
it will hang indefinitely. If you then press Ctrl-C: