mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-18 16:33:57 +08:00
fix: route fetch metadata when first log isnt uploaded (#37114)
* fix: route fetch metadata when first log isnt uploaded * default * simple --------- Co-authored-by: Trey Moen <treymoen@amazon.com>
This commit is contained in:
@@ -208,7 +208,10 @@ class FrameQueue:
|
||||
|
||||
def load_route_metadata(route):
|
||||
from openpilot.common.params import Params, UnknownKeyName
|
||||
lr = LogReader(route.log_paths()[0])
|
||||
path = next((item for item in route.log_paths() if item), None)
|
||||
if not path:
|
||||
raise Exception('error getting route metadata: cannot find any uploaded logs')
|
||||
lr = LogReader(path)
|
||||
init_data, car_params = lr.first('initData'), lr.first('carParams')
|
||||
|
||||
params = Params()
|
||||
|
||||
Reference in New Issue
Block a user