home-assistant-libs / pychromecast

Library for Python 3 to communicate with the Google Chromecast.
MIT License
2.51k stars 378 forks source link

How to handle AssertionError for assert self.socket is not None? #896

Open elibroftw opened 2 months ago

elibroftw commented 2 months ago

After updating to v14, I have encountered a slew of errors. When I call cast.media_controller.update_status(), I get the following error

 File "C:\Users\maste\Documents\GitHub\music-caster\.venv\Lib\site-packages\pychromecast\socket_client.py", line 891, in send_message
    assert self.socket is not None
AssertionError

How should this be handled?