invoke-ai/InvokeAI · error · ValueError

syslog is not available on this system

Error message

syslog is not available on this system

What it means

InvokeAI's logging config supports a syslog handler, but only when Python's built-in syslog module is importable (SYSLOG_AVAILABLE). _parse_syslog_args raises this ValueError when syslog logging is requested on a platform where the syslog module does not exist (Windows) or failed to import.

Source

Thrown at invokeai/backend/util/logging.py:388

            elif handler_name == "syslog":
                ch = cls._parse_syslog_args(arg)
                handlers.append(ch)

            elif handler_name == "file":
                ch = cls._parse_file_args(arg)
                ch.setFormatter(formatter())
                handlers.append(ch)

            elif handler_name == "http":
                ch = cls._parse_http_args(arg)
                handlers.append(ch)
        return handlers

    @staticmethod
    def _parse_syslog_args(args: Optional[str] = None) -> logging.Handler:
        if not SYSLOG_AVAILABLE:
            raise ValueError("syslog is not available on this system")
        if not args:
            args = "/dev/log" if Path("/dev/log").exists() else "address:localhost:514"
        syslog_args: Dict[str, Any] = {}
        try:
            for a in args.split(","):
                arg_name, *arg_value = a.split(":", 2)
                if arg_name == "address":
                    host, *port_list = arg_value
                    port = 514 if not port_list else int(port_list[0])
                    syslog_args["address"] = (host, port)
                elif arg_name == "facility":
                    syslog_args["facility"] = _FACILITY_MAP[arg_value[0]]
                elif arg_name == "socktype":
                    syslog_args["socktype"] = _SOCK_MAP[arg_value[0]]
                else:
                    syslog_args["address"] = arg_name
        except Exception:
            raise ValueError(f"{args} is not a value argument list for syslog logging")

View on GitHub (pinned to 0b6a024f2f)

Solutions

  1. Switch the log handler to console or file on platforms without syslog
  2. Run on Linux/Unix where the syslog module exists, or use network syslog via the 'address:localhost:514' form only if the module imports
  3. Remove the syslog entry from the logging config (invokeai.yaml / log handlers)

Example fix

// before (invokeai.yaml, Windows)
log_handlers: [syslog]
// after
log_handlers: [console]
Defensive patterns

Strategy: fallback

Validate before calling

try:
    import syslog  # noqa
    SYSLOG_OK = True
except ImportError:
    SYSLOG_OK = False
handlers = ["syslog"] if SYSLOG_OK else ["console"]

Type guard

def syslog_supported():
    try:
        import syslog
        return True
    except ImportError:
        return False

Try / catch

try:
    handler = InvokeAIAppConfig._parse_syslog_args(args)
except ValueError:
    logger.warning("syslog unavailable; falling back to console logging")
    handler = logging.StreamHandler()

Prevention

When it happens

Trigger: Configuring InvokeAI logging with a syslog destination (e.g. --log syslog or log_handler_config using syslog) on a system without the syslog module, such as Windows or a Python build without syslog support.

Common situations: Running InvokeAI on Windows with a config copied from a Linux machine; minimal/containers builds where syslog import fails; copying log configs between environments.

Related errors


AI-assisted analysis of invoke-ai/InvokeAI@0b6a024f2f (2026-08-29). Data as JSON: /api/errors/ec93327c546c9765. Report an issue: GitHub.