-
-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update failed! - unexpected character #130
Comments
Can you provide more info like raw log and diagnostics, please? This issue doesn't contain a lot of information I can work with. |
home-assistant_knmi_2024-03-11T10-50-05.292Z.log The corresponding logfile is: This error originated from a custom integration. Logger: custom_components.knmi Update failed! - Timeout error fetching information ---- and --- This error originated from a custom integration. Logger: custom_components.knmi Error fetching knmi data: |
The
|
Sure. If you give me instructions on what to do. Mind you, I'm not that technical. |
I run into the same issue. I am more technical. If you can provide instructions to help me catch the JSON i am willing to help. |
Thanks, in https://github.com/golles/ha-knmi/blob/main/custom_components/knmi/api.py#L65-L72 extend the 2 excepts with a third: except Exception as exception:
import logging
logging.getLogger(__package__).error("Response text: %s", response_text)
raise exception Make sure the indentation is the same as the other 2 excepts This should log the entire json string to the log file. |
I have the same problem and added the except. Here is my log It looks like the API returns a "_" instead of a number for "luchtd" and "ldmmhg" |
The JSON string:
For me also the _ at 'luchtd' and 'ldmmhg' stands out and is at character 268. |
This is indeed an invalid JSON, "-" is still valid, but indeed a few values are missing the quotations. Thanks both for helping out, this still hasn't happened on my location so I wouldn't be able to reproduce this! |
No problem. Let me know if there is anything to test or further investigate. |
If the JSON is consistently invalid, this is expected |
Just out of curiosity. Have you heard anything back from the supplier? The issue has not been fixed yet. |
They confirmed the issue and said they are going to look into it. I'm also investigating a workaround on this side |
Great! Thanks for the update |
This should now be fixed in the API. |
It does not seem to be fixed in the API. Still get the same error
|
That is odd, reopened |
Guess you asked again after them telling saying it is fixed? Seems its quite often both air pressure values. |
I've got a PR ready to fix this, if anyone can test that and provide feedback, that would be great! |
Did you read the instructions?
The problem
This error originated from a custom integration.
Logger: custom_components.knmi
Source: custom_components/knmi/coordinator.py:48
integration: KNMI (documentation, issues)
First occurred: 17:20:21 (8 occurrences)
Last logged: 18:35:21
Update failed! - unexpected character: line 1 column 316 (char 315)
Update failed! - unexpected character: line 1 column 313 (char 312)
Update failed! - unexpected character: line 1 column 315 (char 314)
Integration version
2.0.0
Home Assistant version
2024.3.0
Python version
3.12
Home Assistant log
No response
Diagnostics
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: