-
Notifications
You must be signed in to change notification settings - Fork 9k
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
switch to new json library #24523
Comments
The create time in the cloudlog json is a double, which is converted to a string using snprintf here: https://github.com/commaai/openpilot/blob/master/third_party/json11/json11.cpp#L60 The problem is that this probably takes into account your current locale, producing output with a comma as a decimal separator. Which is not valid json. a workaround would be to switch your system locale to something that uses a relevant json11 issue: dropbox/json11#38 |
@pd0wm thanks, I confirm that the issue is correctly identified and your workaround fixed the issue. Feel free to close the issue if the issue is too minor to be fixed. |
Looks like json11 is no longer maintained. rapidjson seems like a good and mature alternative that may also give us a small speed improvement too. |
https://github.com/nlohmann/json seems like a good one too |
Bounty is to fix this as simply as possible, and it seems like we'll need to switch libraries to do it (confirm this though). If we absolutely have to switch, https://github.com/nlohmann/json seems like the best options. |
First attempt in #31093 had an issue with thneed. |
Describe the bug
I updated
logmessaged.py
as below to see why I keep receiving an error message when I execute manager.py.Below is the result, the json message that is sent by logmessaged.py is not formatted correctly and https://github.com/commaai/openpilot/blob/master/common/logging_extra.py#L100 cannot parse it. (this part is not valid: {"created": 1652444715,3936491, ...)
p.s: the manger seems to continue working without any issue.
OS Version
20.04
openpilot version or commit
No response
Additional info
No response
The text was updated successfully, but these errors were encountered: