{"record":{"id":"a647155ead56a743","repo":"commaai/openpilot","slug":"error-unknown-option-s","errorCode":null,"errorMessage":"error: unknown option %s\n","messagePattern":"error: unknown option (.+?)\n","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"openpilot/tools/cabana/cabana.cc","lineNumber":113,"sourceCode":"      if (!takeValue(argc, argv, i, args.panda_serial)) return 1;\n      args.panda = true;\n    } else if (std::strcmp(a, \"--socketcan\") == 0) {\n      if (!takeValue(argc, argv, i, args.socketcan)) return 1;\n#ifdef __linux__\n#else\n      fprintf(stderr, \"error: --socketcan is only supported on Linux\\n\");\n      return 1;\n#endif\n    } else if (std::strcmp(a, \"--zmq\") == 0) {\n      if (!takeValue(argc, argv, i, args.zmq)) return 1;\n    } else if (std::strcmp(a, \"--data_dir\") == 0) {\n      if (!takeValue(argc, argv, i, args.data_dir)) return 1;\n    } else if (std::strcmp(a, \"--no-vipc\") == 0) {\n      args.no_vipc = true;\n    } else if (std::strcmp(a, \"--dbc\") == 0) {\n      if (!takeValue(argc, argv, i, args.dbc)) return 1;\n    } else if (a[0] == '-') {\n      fprintf(stderr, \"error: unknown option %s\\n\", a);\n      printUsage(argv[0]);\n      return 1;\n    } else if (args.route.empty()) {\n      args.route = a;\n    } else {\n      fprintf(stderr, \"error: unexpected argument %s\\n\", a);\n      printUsage(argv[0]);\n      return 1;\n    }\n  }\n  ok = true;\n  return 0;\n}\n\n}  // namespace\n\nint main(int argc, char *argv[]) {\n  QCoreApplication::setApplicationName(\"Cabana\");","sourceCodeStart":95,"sourceCodeEnd":131,"githubUrl":"https://github.com/commaai/openpilot/blob/516ec1e68203439a73f340f1d0b3b91eabc626ee/openpilot/tools/cabana/cabana.cc#L95-L131","documentation":"Printed by cabana's parseArgs for any argument beginning with '-' that matches no known option (--help/-h, --qcam, --msgq, --zmq, --data_dir, --dbc, --no-vipc, --panda, --panda-serial, --socketcan, --wide_road, --cabin). Usage is printed after the error and the process exits 1.","triggerScenarios":"Passing a misspelled or outdated flag: `cabana --qcamera` instead of --qcam, `--dir` instead of --data_dir, single-dash `-zmq`, or a flag removed/renamed in a newer cabana version.","commonSituations":"Copy-pasting commands from old documentation or forum posts; flags renamed upstream (e.g. camera-selection flags changed over time); scripts written against a different cabana build.","solutions":["Run `cabana --help` and re-check the exact spelling of every flag in your command.","Note options taking values use a space (--dbc file.dbc), not '='.","Update stale scripts when you pull a new openpilot checkout; option sets change between versions."],"exampleFix":"# before\ncabana --qcamera <route>\n\n# after\ncabana --qcam <route>","handlingStrategy":"validation","validationCode":"KNOWN = {'--help','-h','--qcam','--msgq','--zmq','--data_dir','--dbc','--no-vipc','--panda','--panda-serial','--socketcan','--wide_road','--cabin'}\nfor a in args[1:]:\n    if a.startswith('-') and a.split('=')[0] not in KNOWN:\n        raise SystemExit(f'unknown cabana option {a}; see cabana --help')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Cross-check flags against `cabana --help` for your checkout version.","Use space-separated values, not '='.","Re-validate command templates after pulling new openpilot revisions."],"tags":["cabana","cli","usage","argument-parsing","openpilot"],"backgroundTag":null,"analyzedSha":"516ec1e68203439a73f340f1d0b3b91eabc626ee","analyzedAt":"2026-08-15T00:17:37.461Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}