{"record":{"id":"d67efced7a17e1eb","repo":"sqlmapproject/sqlmap","slug":"scan-did-not-produce-a-valid-report-exit-code-s","errorCode":null,"errorMessage":"scan did not produce a valid report (exit code %s)\\n%s","messagePattern":"scan did not produce a valid report \\(exit code (.+?)\\)\\\\n(.+?)","errorType":"exception","errorClass":"SqlmapError","httpStatus":null,"severity":"error","filePath":"lib/utils/library.py","lineNumber":170,"sourceCode":"        else:\n            end = time.time() + timeout\n            while process.poll() is None:\n                if time.time() > end:\n                    _terminateProcess(process)\n                    process.wait()\n                    raise SqlmapError(\"scan timed out after %s second(s)\" % timeout)\n                time.sleep(0.5)\n\n        try:\n            with open(report, \"rb\") as f:\n                return json.loads(f.read().decode(\"utf-8\", \"replace\"))\n        except (IOError, OSError, ValueError):\n            try:\n                with open(logFile, \"rb\") as f:\n                    tail = f.read().decode(\"utf-8\", \"replace\").strip()\n            except (IOError, OSError):\n                tail = \"\"\n            raise SqlmapError(\"scan did not produce a valid report (exit code %s)\\n%s\" % (getattr(process, \"returncode\", None), tail[-1000:]))\n    finally:\n        try:\n            os.close(logHandle)\n        except OSError:\n            pass\n        devnull.close()\n        for path in (report, logFile, configFile):\n            try:\n                os.remove(path)\n            except OSError:\n                pass\n        if ownOutput:\n            shutil.rmtree(outputDir, ignore_errors=True)\n\ndef scanFromRequest(requestFile, **options):\n    \"\"\"\n    Convenience wrapper for scan(requestFile=...) - runs a scan from a saved HTTP request file ('-r')\n    \"\"\"","sourceCodeStart":152,"sourceCodeEnd":188,"githubUrl":"https://github.com/sqlmapproject/sqlmap/blob/0a35b20e3953d341be6c7ac75ccb0b3362540c8d/lib/utils/library.py#L152-L188","documentation":"Error \"scan did not produce a valid report (exit code %s)\\n%s\" thrown in sqlmapproject/sqlmap.","triggerScenarios":"Thrown at lib/utils/library.py:170 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0a35b20e3953d341be6c7ac75ccb0b3362540c8d","analyzedAt":"2026-08-26T23:02:52.002Z","schemaVersion":2},"datasetVersion":"2026-08-27T03:17:27.898Z"}