commaai/openpilot · error
error: unknown option %s
Error message
error: unknown option %s
What it means
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.
Source
Thrown at openpilot/tools/cabana/cabana.cc:113
if (!takeValue(argc, argv, i, args.panda_serial)) return 1;
args.panda = true;
} else if (std::strcmp(a, "--socketcan") == 0) {
if (!takeValue(argc, argv, i, args.socketcan)) return 1;
#ifdef __linux__
#else
fprintf(stderr, "error: --socketcan is only supported on Linux\n");
return 1;
#endif
} else if (std::strcmp(a, "--zmq") == 0) {
if (!takeValue(argc, argv, i, args.zmq)) return 1;
} else if (std::strcmp(a, "--data_dir") == 0) {
if (!takeValue(argc, argv, i, args.data_dir)) return 1;
} else if (std::strcmp(a, "--no-vipc") == 0) {
args.no_vipc = true;
} else if (std::strcmp(a, "--dbc") == 0) {
if (!takeValue(argc, argv, i, args.dbc)) return 1;
} else if (a[0] == '-') {
fprintf(stderr, "error: unknown option %s\n", a);
printUsage(argv[0]);
return 1;
} else if (args.route.empty()) {
args.route = a;
} else {
fprintf(stderr, "error: unexpected argument %s\n", a);
printUsage(argv[0]);
return 1;
}
}
ok = true;
return 0;
}
} // namespace
int main(int argc, char *argv[]) {
QCoreApplication::setApplicationName("Cabana");View on GitHub (pinned to 516ec1e682)
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.
Example fix
# before cabana --qcamera <route> # after cabana --qcam <route>
Defensive patterns
Strategy: validation
Validate before calling
KNOWN = {'--help','-h','--qcam','--msgq','--zmq','--data_dir','--dbc','--no-vipc','--panda','--panda-serial','--socketcan','--wide_road','--cabin'}
for a in args[1:]:
if a.startswith('-') and a.split('=')[0] not in KNOWN:
raise SystemExit(f'unknown cabana option {a}; see cabana --help') Prevention
- Cross-check flags against `cabana --help` for your checkout version.
- Use space-separated values, not '='.
- Re-validate command templates after pulling new openpilot revisions.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- error: %s requires a value
- error: unexpected argument %s
- usage: encoderd --clip OUTPUT START DURATION [--bitrate BPS]
- clip encoding failed: %s
- error: --socketcan is only supported on Linux
AI-assisted analysis of commaai/openpilot@516ec1e682 (2026-08-15).
Data as JSON: /api/errors/a647155ead56a743.
Report an issue: GitHub.