sqlmapproject/sqlmap · error · SqlmapSyntaxException

option '--string' is incompatible with switch '--null-connec

Error message

option '--string' is incompatible with switch '--null-connection'

What it means

Error "option '--string' is incompatible with switch '--null-connection'" thrown in sqlmapproject/sqlmap.

Source

Thrown at lib/core/option.py:2879

        errMsg += "the '--eval' option requires the environment variable "
        errMsg += "'SQLMAP_UNSAFE_EVAL=1' to be explicitly set"
        raise SqlmapSystemException(errMsg)

    if conf.chunked and not any((conf.data, conf.requestFile, conf.forms, conf.openApiFile)):
        errMsg = "switch '--chunked' requires usage of (POST) options/switches '--data', '-r', '--forms' or '--openapi'"
        raise SqlmapSyntaxException(errMsg)

    if conf.api and not conf.configFile:
        errMsg = "switch '--api' requires usage of option '-c'"
        raise SqlmapSyntaxException(errMsg)

    if conf.data and conf.nullConnection:
        errMsg = "option '--data' is incompatible with switch '--null-connection'"
        raise SqlmapSyntaxException(errMsg)

    if conf.string and conf.nullConnection:
        errMsg = "option '--string' is incompatible with switch '--null-connection'"
        raise SqlmapSyntaxException(errMsg)

    if conf.notString and conf.nullConnection:
        errMsg = "option '--not-string' is incompatible with switch '--null-connection'"
        raise SqlmapSyntaxException(errMsg)

    if conf.tor and conf.osPwn:
        errMsg = "option '--tor' is incompatible with switch '--os-pwn'"
        raise SqlmapSyntaxException(errMsg)

    if conf.noCast and conf.hexConvert:
        errMsg = "switch '--no-cast' is incompatible with switch '--hex'"
        raise SqlmapSyntaxException(errMsg)

    if conf.crawlDepth:
        try:
            xrange(conf.crawlDepth)
        except OverflowError as ex:
            errMsg = "invalid value used for option '--crawl' ('%s')" % getSafeExString(ex)

View on GitHub (pinned to 0a35b20e39)

When it happens

Trigger: Thrown at lib/core/option.py:2879 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of sqlmapproject/sqlmap@0a35b20e39 (2026-08-26). Data as JSON: /api/errors/a3ec241a55c6727f. Report an issue: GitHub.