{"record":{"id":"6223257f162a3bc0","repo":"sqlmapproject/sqlmap","slug":"error-occurred-while-opening-log-file-s","errorCode":null,"errorMessage":"error occurred while opening log file ('%s')","messagePattern":"error occurred while opening log file \\('(.+?)'\\)","errorType":"exception","errorClass":"SqlmapGenericException","httpStatus":null,"severity":"error","filePath":"lib/core/dump.py","lineNumber":134,"sourceCode":"\n    def flush(self):\n        if self._outputFP:\n            try:\n                self._outputFP.flush()\n            except IOError:\n                pass\n\n    def setOutputFile(self):\n        if conf.noLogging:\n            self._outputFP = None\n            return\n\n        self._outputFile = os.path.join(conf.outputPath, \"log\")\n        try:\n            self._outputFP = openFile(self._outputFile, 'a' if not conf.flushSession else 'w')\n        except IOError as ex:\n            errMsg = \"error occurred while opening log file ('%s')\" % getSafeExString(ex)\n            raise SqlmapGenericException(errMsg)\n\n    def singleString(self, data, content_type=None):\n        self._reportData(data, content_type)\n        self._write(data, content_type=content_type)\n\n    def string(self, header, data, content_type=None, sort=True):\n        self._reportData(data, content_type)\n\n        if conf.api:\n            self._write(data, content_type=content_type)\n\n        if isListLike(data) and len(data) == 1:\n            data = unArrayizeValue(data)\n\n        if isListLike(data):\n            self.lister(header, data, content_type, sort)\n        elif data is not None:\n            _ = getUnicode(data)","sourceCodeStart":116,"sourceCodeEnd":152,"githubUrl":"https://github.com/sqlmapproject/sqlmap/blob/0a35b20e3953d341be6c7ac75ccb0b3362540c8d/lib/core/dump.py#L116-L152","documentation":"Error \"error occurred while opening log file ('%s')\" thrown in sqlmapproject/sqlmap.","triggerScenarios":"Thrown at lib/core/dump.py:134 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"}