IMPORTANT
This only affects you if you updated OctoPrint on your Raspberry Pi running Python 3.11/OctoPi 1.1.0 from a version prior to 1.11.x before 2025-09-09 12:00:00 UTC!
Everyone else can stop reading here!
If you updated OctoPrint on your Raspberry Pi running Python 3.11/OctoPi 1.1.0 from a version prior to 1.11.x (e.g. 1.10.x) earlier than 2025-09-09 12:00:00 UTC, you might face a semi-broken UI thanks to the websocket no longer working.
Your octoprint.log
will show a SystemError
like the following:
2025-09-09 10:21:38,730 - tornado.application - ERROR - Uncaught exception GET /sockjs/946/3nwumjt5/websocket (192.168.1.181)
HTTPServerRequest(protocol='http', host='octopic.lan', method='GET', uri='/sockjs/946/3nwumjt5/websocket', version='HTTP/1.1', remote_ip='192.168.1.181')
Traceback (most recent call last):
File "/opt/octopi/oprint/lib/python3.11/site-packages/tornado/web.py", line 1790, in _execute
result = await result
^^^^^^^^^^^^
File "/opt/octopi/oprint/lib/python3.11/site-packages/tornado/websocket.py", line 273, in get
await self.ws_connection.accept_connection(self)
File "/opt/octopi/oprint/lib/python3.11/site-packages/tornado/websocket.py", line 863, in accept_connection
await self._accept_connection(handler)
File "/opt/octopi/oprint/lib/python3.11/site-packages/tornado/websocket.py", line 946, in _accept_connection
await self._receive_frame_loop()
File "/opt/octopi/oprint/lib/python3.11/site-packages/tornado/websocket.py", line 1102, in _receive_frame_loop
await self._receive_frame()
File "/opt/octopi/oprint/lib/python3.11/site-packages/tornado/websocket.py", line 1160, in _receive_frame
data = _websocket_mask(self._frame_mask, data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats
This is due to your Raspberry Pi pulling in a broken package of tornado 6.4.2 from piwheels, which is configured as an additional package index on Raspberry Pis to save on compile time. This is sadly something out of the hands of OctoPrint's maintainer and not something that could be anticipated at release time, especially not after piwheels being extremely stable the past years.
The problem with the package has been reported to piwheels already and they pulled the broken package(s), so this issue should no longer arise during updates.
To fix your affected installation, connect to your Raspberry Pi via SSH and run the following command:
~/oprint/bin/pip install --no-binary=tornado tornado==6.4.2
This should pull in a working tornado package from PyPI.
Then restart OctoPrint. Assuming OctoPi:
sudo systemctl restart octoprint
Everything should work again.