diff --git a/selfdrive/ui/sunnypilot/layouts/settings/trips.py b/selfdrive/ui/sunnypilot/layouts/settings/trips.py index 185b0adc4d..b389892d5d 100644 --- a/selfdrive/ui/sunnypilot/layouts/settings/trips.py +++ b/selfdrive/ui/sunnypilot/layouts/settings/trips.py @@ -4,7 +4,6 @@ Copyright (c) 2021-, Haibin Wen, sunnypilot, and a number of other contributors. This file is part of sunnypilot and is licensed under the MIT License. See the LICENSE.md file in the root directory for more details. """ -import json import requests import threading import time @@ -54,7 +53,7 @@ class TripsLayout(Widget): if not stats: return {} try: - return json.loads(stats) + return stats except Exception: cloudlog.exception(f"Failed to decode drive stats: {stats}") return {}