-
-
Notifications
You must be signed in to change notification settings - Fork 210
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
500 error : division by zero #437
Comments
Sounds like it thinks your car has a battery capacity of 0, for some reason. |
Hello, Same for me, I don't known why.... |
Once again, same error ... need to delete db ... |
Hello |
It's available in the docker image with the v3.0.8 tag. |
Hi, the issue is still there: the same make and model of the car, the same error and the new version of the docker file (v3.0.8) |
Same here
Le dim. 22 janv. 2023 à 17:26, Marcel ***@***.***> a écrit :
… Hi, the issue is still there: the same make and model of the car, the same
error and the new version of the docker file (v3.0.8)
—
Reply to this email directly, view it on GitHub
<#437 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANDP2WAESSJCKZC6DLXLB43WTVNTPANCNFSM6AAAAAASLEPPZU>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Same here. |
Describe the bug
500 error while trying to get data. In log, I have a "division by zero" error.
Workaround is to delete database (but I lose datas). After several days or weeks, error randomly reappear.
I tried to identified the data in database but I didn't notice anything wrong.
To Reproduce
Steps to reproduce the behavior:
Call API "get_vehicleinfo" or go to dashboard
Config file
Give the anonymize content of the config file
Environment (please complete the following information):
Log :
2022-11-25 10:47:23,166 :: INFO :: 172.18.0.1 - - [25/Nov/2022 10:47:23] "GET /get_vehicleinfo/xxxxxxxxxxx HTTP/1.1" 500
2022-11-25 10:45:43,836 :: ERROR :: refresh_vehicle_info:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psacc/application/psa_client.py", line 125, in __refresh_vehicle_info
self.get_vehicle_info(car.vin)
File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psacc/application/psa_client.py", line 108, in get_vehicle_info
self.record_info(car)
File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psacc/application/psa_client.py", line 202, in record_info
Charging.record_charging(car, charging_status, charge_date, level, latitude, longitude, self.country_code,
File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psacc/application/charging.py", line 96, in record_charging
Charging.update_chargings(conn, last_charge, car)
File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psacc/application/charging.py", line 52, in update_chargings
Charging.set_charge_price(charge, conn, car)
File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psacc/application/charging.py", line 36, in set_charge_price
battery_curves = Charging.get_battery_curve(conn, charge, car)
File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psacc/application/charging.py", line 31, in get_battery_curve
battery_curves = BatteryChargeCurve.dto_to_battery_curve(car, charge, battery_curves_dto)
File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psacc/application/battery_charge_curve.py", line 26, in dto_to_battery_curve
km_by_kw = 0.8 * battery_curves_dto[-1].autonomy / battery_capacity
ZeroDivisionError: float division by zero
The text was updated successfully, but these errors were encountered: