sqlmapproject/sqlmap · error · SqlmapConnectionException
error occurred while accessing session file '%s' ('%s'). If
Error message
error occurred while accessing session file '%s' ('%s'). If the problem persists please rerun with '--flush-session' What it means
Error "error occurred while accessing session file '%s' ('%s'). If the problem persists please rerun with '--flush-session'" thrown in sqlmapproject/sqlmap.
Source
Thrown at lib/utils/hashdb.py:124
if retVal is None:
retVal = self._read_cache.get(hash_)
if retVal is None:
for _ in xrange(HASHDB_RETRIEVE_RETRIES):
try:
for row in self.cursor.execute("SELECT value FROM storage WHERE id=?", (hash_,)):
retVal = row[0]
except (sqlite3.OperationalError, sqlite3.DatabaseError) as ex:
if any(_ in getSafeExString(ex) for _ in ("locked", "no such table")):
warnMsg = "problem occurred while accessing session file '%s' ('%s')" % (self.filepath, getSafeExString(ex))
singleTimeWarnMessage(warnMsg)
elif "Could not decode" in getSafeExString(ex):
break
else:
errMsg = "error occurred while accessing session file '%s' ('%s'). " % (self.filepath, getSafeExString(ex))
errMsg += "If the problem persists please rerun with '--flush-session'"
raise SqlmapConnectionException(errMsg)
else:
break
time.sleep(1)
if retVal is not None:
self._read_cache[hash_] = retVal
if retVal and unserialize:
try:
retVal = unserializeObject(retVal)
except:
retVal = None
warnMsg = "error occurred while unserializing value for session key '%s'. " % key
warnMsg += "If the problem persists please rerun with '--flush-session'"
logger.warning(warnMsg)
return retValView on GitHub (pinned to 0a35b20e39)
When it happens
Trigger: Thrown at lib/utils/hashdb.py:124 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/fedaa4e50e0993d4.
Report an issue: GitHub.