-
Notifications
You must be signed in to change notification settings - Fork 20
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
Charge details giving an error #18
Comments
I see/can confirm this same behaviour. |
Hello @alecwills Some rows can contain null as data and a SQL query with book does not support null. There is a workaround that I've done at drives endpoint that I can add here, and that is to use NullBoolean instead of Boolean only. I can make a fix and you can test it. My wife is at the computer currently but later in the evening I will add a little code :-) Regards, |
Here is the NullSupport fine containing the fix.. it's using SQL package for this but there could be a better way of implementation maybe. |
Now you can test the fix in docker image with label main instead if latest :-) confirm if it fix by @LelandSindt helped you @alecwills |
Ah, I thought that |
Not sure if its a better way, but [after some experimenting] I confirmed that you can import but then it looks like you are also pulling in some logic to help with the json marshaling. ..... if it's not already clear, I am here to learn as much as I am here to help. |
Yeah.. I had issues with errors in the sql statements and that what was I was finding after extensive googling.. 😄 Anyhow.. there is probably a better solution to not link a full library. the database/sql library does include a looot of stuff, so would be pretty nice to only have the part that is needed. But I'm not sure how to structure a new type like that. |
Thanks @tobiasehlert @LelandSindt I'm not a developer or big github user so can't quite tell who resolved this. I can confirm I have pulled the main label docker image and it is now working as expected. Thanks for your speedy help. I assume I close this, apologies if that's wrong. |
Hey @tobiasehlert, I think I have the same problem. Since 4 weeks I can access the charges data. Now I got the error " Empty reply from server What should I do? |
API is working correctly for all endpoints except /api/v1/cars/:carid/charges/:chargeid
the :carid and :chargeid I am using are both valid.
The web response is ERR_EMPTY_RESPONSE
The logs on the docker instance (Ubuntu server 19.10 64bit on Raspberry Pi 4) is;
sql: Scan error on column index 5, name "not_enough_power_to_heat": sql/driver: couldn't convert <nil> (<nil>) into type bool
I've checked the DB and while this column exists every row has null in this column. Note: I am in Australia and car is Model 3 and I don't believe my battery is ever heated as it's never cold enough here.
The text was updated successfully, but these errors were encountered: