{"record":{"id":"c2d15519cc297992","repo":"sqlmapproject/sqlmap","slug":"could-not-locate-the-sqlmap-engine-s","errorCode":null,"errorMessage":"could not locate the sqlmap engine ('%s')","messagePattern":"could not locate the sqlmap engine \\('(.+?)'\\)","errorType":"exception","errorClass":"SqlmapError","httpStatus":null,"severity":"error","filePath":"lib/utils/library.py","lineNumber":95,"sourceCode":"    'outputDir' to keep the run's files.\n\n    Example:\n        import sqlmap\n        result = sqlmap.scan(\"http://target/vuln.php?id=1\", dumpTable=True, tbl=\"users\")\n    \"\"\"\n\n    import shutil\n    import subprocess\n    import time\n\n    from lib.core.common import saveConfig\n    from lib.core.optiondict import optDict\n\n    if not (url or requestFile):\n        raise SqlmapError(\"scan() requires either 'url' or 'requestFile'\")\n\n    if not os.path.isfile(SQLMAP_FILE):\n        raise SqlmapError(\"could not locate the sqlmap engine ('%s')\" % SQLMAP_FILE)\n\n    knownOptions = set()\n    for family in optDict.values():\n        knownOptions.update(family)\n\n    config = {}\n    if url:\n        config[\"url\"] = url\n    if requestFile:\n        config[\"requestFile\"] = requestFile\n    config.update(options)\n\n    unknown = [_ for _ in config if _ not in knownOptions]\n    if unknown:\n        raise SqlmapError(\"unknown option(s) %s - scan() expects sqlmap option names as used in a configuration file (e.g. getBanner, dumpTable, tbl, technique, level), not command line switches\" % \", \".join(repr(_) for _ in sorted(unknown)))\n\n    handle, report = tempfile.mkstemp(prefix=\"sqlmap-\", suffix=\".json\")\n    os.close(handle)","sourceCodeStart":77,"sourceCodeEnd":113,"githubUrl":"https://github.com/sqlmapproject/sqlmap/blob/0a35b20e3953d341be6c7ac75ccb0b3362540c8d/lib/utils/library.py#L77-L113","documentation":"Environment guard in scan(): SQLMAP_FILE (the sqlmap engine entry script the wrapper invokes as a subprocess) does not exist at the expected path, meaning the installation is broken or the package layout changed. The '%s' is the missing engine file path.","triggerScenarios":"Thrown at lib/utils/library.py:95 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Install/restore a complete sqlmap source tree containing sqlmap.py","Run from the repository root or fix SQLMAP_FILE resolution","Use the packaged CLI if the library layout is broken"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0a35b20e3953d341be6c7ac75ccb0b3362540c8d","analyzedAt":"2026-08-26T23:02:52.002Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}