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:
Trey Moen
2026-02-07 12:52:28 -07:00
committed by GitHub
parent 51312afd3d
commit db8cd9f411

View File

@@ -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()