No default_encoding in async request method #2623
Replies: 1 comment
-
|
Ok, so if I add Beginner's question. Learning every day. If I'm still not doing it right, please let me know. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I’m trying to modify Home Assistant code to add a
default_encodingconfiguration variable to the REST sensor platform. Since the change from chardet to UTF-8, some websites aren’t decoded properly (those without explicit character encoding declaration).When using an async request, I get this error :
Unexpected error fetching rest data data: AsyncClient.request() got an unexpected keyword argument 'default_encoding'Here’s the part of the code in the REST component (data.py) that causes the problem :
And this is the request method in httpx _client.py
Would adding the keyword argument for
default_encodingto the request method solve the problem? Thanks for your opinion on this.Maybe I’m not using the library right though. My coding skills are really basic.
Beta Was this translation helpful? Give feedback.
All reactions