- Code: Select all
2023-04-02 18:23:41.590 Web Server Error Error in plugin execution InitializeMain:
File "plugin.py", line 3, in init plugin
File "plugin.py", line 21, in <module>
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/sanic/__init__.py", line 2, in <module>
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/sanic/app.py", line 73, in <module>
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/sanic/mixins/runner.py", line 51, in <module>
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/sanic/server/protocols/websocket_protocol.py", line 3, in <module>
type: cannot import name 'CLOSED' from 'websockets.connection' (/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/websockets/connection.py)
2023-04-02 18:23:41.591 Application Stopping plugin "Web Server 2022.2.0" (pid 7776)
2023-04-02 18:23:42.239 Application Stopped plugin "Web Server 2022.2.0"
Based on this Stack Overflow article, a workaround was to downgrade websockets to version 10.n, the version before 11.0. This was accomplished via this command:
- Code: Select all
sudo -H /Library/Frameworks/Python.framework/Versions/3.10/bin/python3.10 -m pip install --upgrade --force-reinstall websockets==10.4
Once I did this I was able to stop/start the Indigo Server and its web server resumed operation successfully. Hurray!
I think this issue is going to bite anyone else upgrading or installing Indigo at this point in time, since the latest version of websockets will be installed automatically. Similarly, if someone upgrades websockets for other applications and/or projects it would then impact Indigo's server behavior the next time it is launched on that system.
Here's the changelog for websockets in case that helps.