{"record":{"id":"daa9277c243ecc8b","repo":"sqlmapproject/sqlmap","slug":"sqlalchemy-not-available-e-g-pip-s-install-sqla","errorCode":null,"errorMessage":"SQLAlchemy not available (e.g. 'pip%s install SQLAlchemy')","messagePattern":"SQLAlchemy not available \\(e\\.g\\. 'pip(.+?) install SQLAlchemy'\\)","errorType":"exception","errorClass":"SqlmapMissingDependence","httpStatus":null,"severity":"error","filePath":"lib/utils/sqlalchemy.py","lineNumber":111,"sourceCode":"                            raise SqlmapConnectionException(\"SQLAlchemy connection issue (obsolete version of pymssql ('%s') is causing problems)\" % pymssql.__version__)\n                    except ImportError:\n                        pass\n                    # Note: surface (as a proper SqlmapConnectionException) instead of silently continuing with self.connector left None\n                    raise SqlmapConnectionException(\"SQLAlchemy connection issue ('%s')\" % getSafeExString(ex))\n                elif \"invalid literal for int() with base 10: '0b\" in traceback.format_exc():\n                    raise SqlmapConnectionException(\"SQLAlchemy connection issue ('https://bitbucket.org/zzzeek/sqlalchemy/issues/3975')\")\n                else:\n                    # Note: raise as SqlmapConnectionException (like the generic handler below) so the caller's native-connector\n                    # fallback engages and no raw TypeError/ValueError can reach sqlmap's top-level handler\n                    raise SqlmapConnectionException(\"SQLAlchemy connection issue ('%s')\" % getSafeExString(ex))\n            except SqlmapFilePathException:\n                raise\n            except Exception as ex:\n                raise SqlmapConnectionException(\"SQLAlchemy connection issue ('%s')\" % getSafeExString(ex))\n\n            self.printConnected()\n        else:\n            raise SqlmapMissingDependence(\"SQLAlchemy not available (e.g. 'pip%s install SQLAlchemy')\" % ('3' if six.PY3 else \"\"))\n\n    def fetchall(self):\n        try:\n            retVal = []\n            for row in self.cursor.fetchall():\n                retVal.append(tuple(row))\n            return retVal\n        except _sqlalchemy.exc.ProgrammingError as ex:\n            logger.log(logging.WARN if conf.dbmsHandler else logging.DEBUG, \"(remote) %s\" % getSafeExString(ex))\n            return None\n\n    def execute(self, query, commit=True):\n        retVal = False\n\n        # Reference: https://stackoverflow.com/a/69491015\n        if hasattr(_sqlalchemy, \"text\"):\n            query = _sqlalchemy.text(query)\n","sourceCodeStart":93,"sourceCodeEnd":129,"githubUrl":"https://github.com/sqlmapproject/sqlmap/blob/0a35b20e3953d341be6c7ac75ccb0b3362540c8d/lib/utils/sqlalchemy.py#L93-L129","documentation":"Error \"SQLAlchemy not available (e.g. 'pip%s install SQLAlchemy')\" thrown in sqlmapproject/sqlmap.","triggerScenarios":"Thrown at lib/utils/sqlalchemy.py:111 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"}