Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

Recursion Error in NiceToICY #102

Closed
twomugs opened this issue Nov 11, 2022 · 2 comments
Closed

Recursion Error in NiceToICY #102

twomugs opened this issue Nov 11, 2022 · 2 comments

Comments

@twomugs
Copy link

twomugs commented Nov 11, 2022

Some of my Home Assistant integrations have been dropping out recently, and when I looked at the logs, it seem that linkplay is the cause behind it.

Here are a couple of log from HA for Waze and Hive integrations showing recursive function call to the NiceToICY function:
hive.txt
waze.txt

I'm running HA 2022.10.05 in docker container, with LinkPlay 3.1.8 installed through HACS.
The speaker is an AudioPro C5A

I took a look at the code and found this:
async_update_from_icecast() replaces urllib.request.http.client.HTTPResponse._read_status function with NiceToICY(), which in turn calls the original function. However, there is no test to see if this substitution has already been performed, so it end up getting wrapped again and again with each successive call to async_update_from_icecast(). Eventually the call stack becomes too deep, leads the the RecursionError exception.

This may explain some of the timeouts and other 'network problems' that have been reported for this integration.

As the urllib library is used by other integrations, it can cause problesm for other integrations at random too.

@nagyrobi
Copy link
Owner

Thanks. @marcelveldt this must be it

@Thrasher2020
Copy link

Is there a solution to this issue? It is taking down my integrations as well :(

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants