commaai/openpilot · error

%s

Error message

%s

What it means

Printed in cabana's main() when constructing PandaStream(&app, {.serial = args.panda_serial}) throws — the exception's what() is printed verbatim on its own line (the '%s\n' wrapper) and main returns 0. Typical PandaStream failures: no panda found on USB, USB claim/open errors, wrong serial specified, or the device being busy (claimed by another process).

Source

Thrown at openpilot/tools/cabana/cabana.cc:156

  utils::setTheme(settings.theme);

  CabanaArgs args;
  bool args_ok = false;
  if (const int code = parseArgs(argc, argv, args, args_ok); !args_ok) {
    return code;
  }

  AbstractStream *stream = nullptr;

  if (args.msgq) {
    stream = new DeviceStream(&app);
  } else if (!args.zmq.empty()) {
    stream = new DeviceStream(&app, QString::fromStdString(args.zmq));
  } else if (args.panda || !args.panda_serial.empty()) {
    try {
      stream = new PandaStream(&app, {.serial = args.panda_serial});
    } catch (std::exception &e) {
      fprintf(stderr, "%s\n", e.what());
      return 0;
    }
#ifdef __linux__
  } else if (SocketCanStream::available() && !args.socketcan.empty()) {
    stream = new SocketCanStream(&app, {.device = args.socketcan});
#endif
  } else {
    uint32_t replay_flags = REPLAY_FLAG_NONE;
    if (args.wide_road) replay_flags |= REPLAY_FLAG_WIDE_ROAD;
    if (args.qcam) replay_flags |= REPLAY_FLAG_QCAMERA;
    if (args.cabin) replay_flags |= REPLAY_FLAG_CABIN_CAMERA;
    if (args.no_vipc) replay_flags |= REPLAY_FLAG_NO_VIPC;

    QString route;
    if (!args.route.empty()) {
      route = QString::fromStdString(args.route);
    } else if (args.demo) {
      route = DEMO_ROUTE;

View on GitHub (pinned to 516ec1e682)

Solutions

  1. List connected pandas (e.g. `lsusb` / pandas are bbddaa... serials; use the tools in panda repo) and confirm yours appears.
  2. Stop other processes holding the device (boardd, flashing tools) before starting cabana --panda.
  3. Pass the exact serial via --panda-serial when more than one panda is connected.
  4. Install/refresh udev rules or run with sufficient permissions so USB open succeeds.

Example fix

# before
pkill -f boardd; cabana --panda            # or nothing claims/plugs

# after
# ensure device free and addressable
cabana --panda-serial 4d0000000052513032363438
Defensive patterns

Strategy: try-catch

Validate before calling

import subprocess
devices = subprocess.run(['lsusb'], capture_output=True, text=True).stdout
if 'comma' not in devices.lower() and 'bbddaa' not in devices.lower():
    raise SystemExit('no panda detected on USB')

Prevention

When it happens

Trigger: Running `cabana --panda` with no panda plugged in, `--panda-serial <wrong-id>` when multiple pandas are attached, the panda already claimed by boardd/panda_flash, or a permissions problem opening the USB device (udev rules) which surfaces as an exception message.

Common situations: First-run on Linux without udev rules for the comma panda serial device, forgetting boardd is running and holding the interface, or specifying a serial from a different device.

Related errors


AI-assisted analysis of commaai/openpilot@516ec1e682 (2026-08-15). Data as JSON: /api/errors/e55f73c0225c9330. Report an issue: GitHub.