{"record":{"id":"b82bea352998aaee","repo":"commaai/openpilot","slug":"error-getting-route-metadata-cannot-find-any-uplo","errorCode":null,"errorMessage":"error getting route metadata: cannot find any uploaded logs","messagePattern":"error getting route metadata: cannot find any uploaded logs","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"openpilot/tools/clip/run.py","lineNumber":217,"sourceCode":"    if result is None:\n      raise StopIteration(\"No more frames\")\n    return result\n\n  def stop(self):\n    self._stop.set()\n    while not self._queue.empty():\n      try:\n        self._queue.get_nowait()\n      except queue.Empty:\n        break\n    self._thread.join(timeout=2.0)\n\n\ndef load_route_metadata(route):\n  from openpilot.common.params import Params, UnknownKeyName\n  path = next((item for item in route.log_paths() if item), None)\n  if not path:\n    raise Exception('error getting route metadata: cannot find any uploaded logs')\n  lr = LogReader(path)\n  init_data, car_params = lr.first('initData'), lr.first('carParams')\n\n  params = Params()\n  for entry in init_data.params.entries:\n    try:\n      params.put(entry.key, params.cpp2python(entry.key, entry.value), block=True)\n    except UnknownKeyName:\n      pass\n\n  origin = init_data.gitRemote.split('/')[3] if len(init_data.gitRemote.split('/')) > 3 else 'unknown'\n  return {\n    'version': init_data.version, 'route': route.name.canonical_name,\n    'car': car_params.carFingerprint if car_params else 'unknown', 'origin': origin,\n    'branch': init_data.gitBranch, 'commit': init_data.gitCommit[:7], 'modified': str(init_data.dirty).lower(),\n  }\n\n","sourceCodeStart":199,"sourceCodeEnd":235,"githubUrl":"https://github.com/commaai/openpilot/blob/516ec1e68203439a73f340f1d0b3b91eabc626ee/openpilot/tools/clip/run.py#L199-L235","documentation":"load_route_metadata() needs at least one uploaded log to read initData/carParams from; it takes the first non-None entry of route.log_paths() and fails if none exist. Without uploaded rlogs the clip tool cannot restore params or determine the git origin, so it aborts early with this Exception (note: generic Exception, not RuntimeError).","triggerScenarios":"Calling load_route_metadata(route) for a route whose log_paths() are all None - un-uploaded route, private/bogus dongle id, or wrong route string; API returned empty log listings because the route does not belong to the authenticated account.","commonSituations":"Route name typo or fabricated route id; route from another user's dongle without access; local-only routes never pushed to comma servers.","solutions":["Verify the route exists and is accessible: check route.log_paths() length and contents, and confirm the route appears at comma.ai/userdata","Re-authenticate (python tools/lib/auth.py) if the API hides logs due to an expired token","For local-only routes, use a code path that reads local segment dirs instead of load_route_metadata"],"exampleFix":"# before\nmeta = load_route_metadata(Route(\"b0c9d232|2024-01-01--00-00-00\"))\n\n# after\nroute = Route(\"b0c9d232|2024-01-01--00-00-00\")\nif not any(route.log_paths()):\n    raise SystemExit(\"route has no uploaded logs; check route name and access\")\nmeta = load_route_metadata(route)","handlingStrategy":"try-catch","validationCode":"log_paths = [p for p in route.log_paths() if p]\nassert log_paths, 'route has no uploaded logs - check route name and account access'","typeGuard":null,"tryCatchPattern":"try:\n    meta = load_route_metadata(route)\nexcept Exception as e:  # note: raised as generic Exception, not RuntimeError\n    if 'cannot find any uploaded logs' in str(e):\n        raise SystemExit('route has no uploaded logs; verify route id and run tools/lib/auth.py')\n    raise","preventionTips":["Check route accessibility (owner, upload state) before invoking metadata loading","Catch generic Exception here - the helper raises bare Exception, so except RuntimeError would miss it"],"tags":["route-data","api","clip-tool","openpilot"],"backgroundTag":null,"analyzedSha":"516ec1e68203439a73f340f1d0b3b91eabc626ee","analyzedAt":"2026-08-15T00:17:37.461Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}