sqlmapproject/sqlmap · error · SqlmapFilePathException

preprocess script ' ' does not exist

Error message

preprocess script '%s' does not exist

What it means

--preprocess loading: a listed preprocess script does not exist at the given path, so no request-preprocessing function can be loaded and SqlmapFilePathException aborts init.

Solutions

  1. Fix the --preprocess path typo or use an absolute path
  2. Verify the script file is readable by the sqlmap process
  3. Remove the entry if preprocessing is not needed
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at lib/core/option.py:988 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/dbbb6d08d3e80b4e. Report an issue: GitHub.

Appendix: source

Thrown at lib/core/option.py:988

def _setPreprocessFunctions():
    """
    Loads preprocess function(s) from given script(s)
    """

    if conf.preprocess:
        for script in re.split(PARAMETER_SPLITTING_REGEX, conf.preprocess):
            found = False
            function = None

            script = safeFilepathEncode(script.strip())

            try:
                if not script:
                    continue

                if not os.path.exists(script):
                    errMsg = "preprocess script '%s' does not exist" % script
                    raise SqlmapFilePathException(errMsg)

                elif not script.endswith(".py"):
                    errMsg = "preprocess script '%s' should have an extension '.py'" % script
                    raise SqlmapSyntaxException(errMsg)
            except UnicodeDecodeError:
                errMsg = "invalid character provided in option '--preprocess'"
                raise SqlmapSyntaxException(errMsg)

            dirname, filename = os.path.split(script)
            dirname = os.path.abspath(dirname)

            infoMsg = "loading preprocess module '%s'" % filename[:-3]
            logger.info(infoMsg)

            if not os.path.exists(os.path.join(dirname, "__init__.py")):
                errMsg = "make sure that there is an empty file '__init__.py' "
                errMsg += "inside of preprocess scripts directory '%s'" % dirname
                raise SqlmapGenericException(errMsg)

View on GitHub (pinned to 0a35b20e39)