{"record":{"id":"a21f3d5779de50fe","repo":"commaai/openpilot","slug":"missing-logs-len-sr-seg-idxs-logs-were-not-fo","errorCode":null,"errorMessage":"{missing_logs}/{len(sr.seg_idxs)} logs were not found, please ensure all logs are uploaded. You can fall back to qlogs with '/a' selector at the end of the route name.\n\nExceptions for sources:\n  - {exceptions joined with \\n  - }","messagePattern":"(.+?)/(.+?) logs were not found, please ensure all logs are uploaded\\. You can fall back to qlogs with '/a' selector at the end of the route name\\.\n\nExceptions for sources:\n  - (.+?)","errorType":"exception","errorClass":"LogsUnavailable","httpStatus":null,"severity":"error","filePath":"openpilot/tools/lib/logreader.py","lineNumber":198,"sourceCode":"        # We've found all files, return them\n        if len(needed_seg_idxs) == 0:\n          return list(valid_files.values())\n        else:\n          raise FileNotFoundError(f\"Did not find {fn} for seg idxs {needed_seg_idxs} of {sr.route_name}\")\n\n      except Exception as e:\n        exceptions[source.__name__] = e\n\n    if fn == try_fns[0]:\n      missing_logs = len(needed_seg_idxs)\n      if mode == ReadMode.AUTO:\n        cloudlog.warning(f\"{missing_logs}/{len(sr.seg_idxs)} rlogs were not found, falling back to qlogs for those segments...\")\n      elif mode == ReadMode.AUTO_INTERACTIVE:\n        if input(f\"{missing_logs}/{len(sr.seg_idxs)} rlogs were not found, would you like to fallback to qlogs for those segments? (y/N) \").lower() != \"y\":\n          break\n\n  missing_logs = len(needed_seg_idxs)\n  raise LogsUnavailable(f\"{missing_logs}/{len(sr.seg_idxs)} logs were not found, please ensure all logs \" +\n                        \"are uploaded. You can fall back to qlogs with '/a' selector at the end of the route name.\\n\\n\" +\n                        \"Exceptions for sources:\\n  - \" + \"\\n  - \".join([f\"{k}: {repr(v)}\" for k, v in exceptions.items()]))\n\n\ndef parse_indirect(identifier: str) -> str:\n  if \"useradmin.comma.ai\" in identifier:\n    query = parse_qs(urlparse(identifier).query)\n    identifier = query[\"onebox\"][0]\n  elif \"connect.comma.ai\" in identifier:\n    path = urlparse(identifier).path.strip(\"/\").split(\"/\")\n    path = ['/'.join(path[:2]), *path[2:]]  # recombine log id\n\n    identifier = path[0]\n    if len(path) > 2:\n      # convert url with seconds to segments\n      start, end = int(path[1]) // 60, int(path[2]) // 60 + 1\n      identifier = f\"{identifier}/{start}:{end}\"\n","sourceCodeStart":180,"sourceCodeEnd":216,"githubUrl":"https://github.com/commaai/openpilot/blob/516ec1e68203439a73f340f1d0b3b91eabc626ee/openpilot/tools/lib/logreader.py#L180-L216","documentation":"The terminal failure of LogReader's source-resolution loop: after trying every source for both rlogs and qlogs (and any interactive/automatic fallback declined or exhausted), the remaining missing segments raise LogsUnavailable with a per-source exception summary. It means the requested logs genuinely could not be fetched from anywhere.","triggerScenarios":"LogReader/SimpleLogReader on a route where rlogs are missing AND the qlog fallback was declined (answered 'n' in AUTO_INTERACTIVE) or qlogs are also missing; fully un-uploaded routes.","commonSituations":"Route never uploaded (only on device); auth token lacking access to a private route; typo'd dongle ID/route timestamp so nothing matches; data still syncing.","solutions":["Read the per-source exceptions in the message — they name the real cause (401/404/URL errors)","Verify route accessibility: open it in cabana/connect, or check `api.get('/v1/route/...')`","If rlogs are known-missing, request qlogs up front with the '/a' selector instead of declining the fallback"],"exampleFix":"# before\nlogs = LogReader(route_name)\n\n# after\nfrom openpilot.tools.lib.logreader import LogsUnavailable\ntry:\n    logs = LogReader(route_name)\nexcept LogsUnavailable:\n    logs = LogReader(route_name + '/a')  # qlog fallback","handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"from openpilot.tools.lib.logreader import LogsUnavailable\ntry:\n    logs = LogReader(route_name)\nexcept LogsUnavailable as e:\n    # message lists per-source exceptions; inspect before giving up\n    raise SystemExit(f'route unavailable: {e}')","preventionTips":["Read the embedded per-source exception lines — they pinpoint auth vs network vs missing data","Use '/a' selector up front when rlogs may be missing","Confirm route access (cabana) before batch-processing private routes"],"tags":["logs","logreader","route","missing-files"],"backgroundTag":null,"analyzedSha":"516ec1e68203439a73f340f1d0b3b91eabc626ee","analyzedAt":"2026-08-15T00:17:37.461Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}