I’m experiencing a websocket incompatibility issue with the roonapi Python library when using recent versions of websocket-client.
Environment:
Python 3.14
roonapi (latest from PyPI)
websocket-client 1.9.0
Error:
ERROR roonapisocket – Error while parsing message ‘<websocket._app.WebSocketApp object at 0x…>’
AttributeError: ‘WebSocketApp’ object has no attribute ‘decode’
Issue: The error occurs in roonapisocket.py line 127, where the code attempts to call .decode(“utf-8”) on what appears to be a WebSocketApp object rather than a bytes object. This suggests the websocket-client library API has changed between versions.
Workaround: Downgrading to websocket-client==1.6.4 resolves the issue, but this creates conflicts with other packages (like Jupyter) that require websocket-client >= 1.7.
Question: Are there plans to update roonapi to support newer versions of websocket-client? Or is there a recommended approach for managing this dependency conflict?
· None of these quite match
Tell us what's going on
· https://community.roonlabs.com/t/roonapi-python-library-websocket-client-compatibility-issue/312978?u=michael_dephillips. please take a look at this post in tinkering. I think it might be a support issue too.
Thanks for the detailed report and for linking the Tinkering thread.
Just to clarify expectations: roonapi is not an officially supported Roon component. It’s a community-maintained library, and issues related to Python dependency compatibility (such as changes in websocket-client) are outside the scope of official Roon support.
For now, if you need a stable environment without pinning websocket-client globally, the usual approach is to run roonapi in an isolated virtualenv (or a small Docker container) with its own dependency set, so it doesn’t conflict with Jupyter’s requirement, but for the same reason, running Roon integrations in Docker or other containerized environments is not officially supported, so we can’t guarantee compatibility or provide troubleshooting guidance there.
At this time, there are no announced plans to update roonapi as part of Roon’s supported product offerings. Questions around dependency pinning or adapting the library to newer versions of websocket-client would be best addressed directly in the Tinkering thread or with the library maintainer.
Thanks for understanding, and for contributing detailed technical feedback to the community.