{"record":{"id":"b9b082b45ea86637","repo":"sqlmapproject/sqlmap","slug":"make-sure-that-there-is-an-empty-file-init-py","errorCode":null,"errorMessage":"make sure that there is an empty file '__init__.py' inside of tamper scripts directory '%s'","messagePattern":"make sure that there is an empty file '__init__\\.py' inside of tamper scripts directory '(.+?)'","errorType":"exception","errorClass":"SqlmapGenericException","httpStatus":null,"severity":"error","filePath":"lib/core/option.py","lineNumber":894,"sourceCode":"                    raise SqlmapFilePathException(errMsg)\n\n                elif not script.endswith(\".py\"):\n                    errMsg = \"tamper script '%s' should have an extension '.py'\" % script\n                    raise SqlmapSyntaxException(errMsg)\n            except UnicodeDecodeError:\n                errMsg = \"invalid character provided in option '--tamper'\"\n                raise SqlmapSyntaxException(errMsg)\n\n            dirname, filename = os.path.split(script)\n            dirname = os.path.abspath(dirname)\n\n            infoMsg = \"loading tamper module '%s'\" % filename[:-3]\n            logger.info(infoMsg)\n\n            if not os.path.exists(os.path.join(dirname, \"__init__.py\")):\n                errMsg = \"make sure that there is an empty file '__init__.py' \"\n                errMsg += \"inside of tamper scripts directory '%s'\" % dirname\n                raise SqlmapGenericException(errMsg)\n\n            if dirname not in sys.path:\n                sys.path.insert(0, dirname)\n\n            try:\n                getattr(importlib, \"invalidate_caches\", lambda: None)()  # Note: py3.3+ only; a script just written into an already-scanned dir is invisible to a cached FileFinder (Windows coarse mtime)\n                module = __import__(safeFilepathEncode(filename[:-3]))\n            except Exception as ex:\n                raise SqlmapSyntaxException(\"cannot import tamper module '%s' (%s)\" % (getUnicode(filename[:-3]), getSafeExString(ex)))\n\n            priority = PRIORITY.NORMAL if not hasattr(module, \"__priority__\") else module.__priority__\n            priority = priority if priority is not None else PRIORITY.LOWEST\n\n            for name, function in inspect.getmembers(module, inspect.isfunction):\n                if name == \"tamper\" and (hasattr(inspect, \"signature\") and all(_ in inspect.signature(function).parameters for _ in (\"payload\", \"kwargs\")) or inspect.getargspec(function).args and inspect.getargspec(function).keywords == \"kwargs\"):\n                    found = True\n                    kb.tamperFunctions.append(function)\n                    function.__name__ = module.__name__","sourceCodeStart":876,"sourceCodeEnd":912,"githubUrl":"https://github.com/sqlmapproject/sqlmap/blob/0a35b20e3953d341be6c7ac75ccb0b3362540c8d/lib/core/option.py#L876-L912","documentation":"Error \"make sure that there is an empty file '__init__.py' inside of tamper scripts directory '%s'\" thrown in sqlmapproject/sqlmap.","triggerScenarios":"Thrown at lib/core/option.py:894 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"}