sqlmapproject/sqlmap · error · SqlmapConnectionException

SQLAlchemy connection issue (obsolete version of pymssql ('%

Error message

SQLAlchemy connection issue (obsolete version of pymssql ('%s') is causing problems)

What it means

Error "SQLAlchemy connection issue (obsolete version of pymssql ('%s') is causing problems)" thrown in sqlmapproject/sqlmap.

Source

Thrown at lib/utils/sqlalchemy.py:93

                    # Note: SQLAlchemy's absolute-SQLite form is 'sqlite:///' + abspath (the abspath's own
                    # leading '/' completes the triple slash on POSIX). A 4th slash yields db '//path' (only
                    # tolerated on Linux by accident) and, on Windows, '/C:\...' which fails to open.
                    self.address = "%s///%s" % (_[0], os.path.abspath(self.db))

                if self.dialect == "sqlite":
                    engine = _sqlalchemy.create_engine(self.address, connect_args={"check_same_thread": False})
                elif self.dialect == "oracle":
                    engine = _sqlalchemy.create_engine(self.address)
                else:
                    engine = _sqlalchemy.create_engine(self.address, connect_args={})

                self.connector = engine.connect()
            except (TypeError, ValueError) as ex:
                if "_get_server_version_info" in traceback.format_exc():
                    try:
                        import pymssql
                        if int(pymssql.__version__[0]) < 2:
                            raise SqlmapConnectionException("SQLAlchemy connection issue (obsolete version of pymssql ('%s') is causing problems)" % pymssql.__version__)
                    except ImportError:
                        pass
                    # Note: surface (as a proper SqlmapConnectionException) instead of silently continuing with self.connector left None
                    raise SqlmapConnectionException("SQLAlchemy connection issue ('%s')" % getSafeExString(ex))
                elif "invalid literal for int() with base 10: '0b" in traceback.format_exc():
                    raise SqlmapConnectionException("SQLAlchemy connection issue ('https://bitbucket.org/zzzeek/sqlalchemy/issues/3975')")
                else:
                    # Note: raise as SqlmapConnectionException (like the generic handler below) so the caller's native-connector
                    # fallback engages and no raw TypeError/ValueError can reach sqlmap's top-level handler
                    raise SqlmapConnectionException("SQLAlchemy connection issue ('%s')" % getSafeExString(ex))
            except SqlmapFilePathException:
                raise
            except Exception as ex:
                raise SqlmapConnectionException("SQLAlchemy connection issue ('%s')" % getSafeExString(ex))

            self.printConnected()
        else:
            raise SqlmapMissingDependence("SQLAlchemy not available (e.g. 'pip%s install SQLAlchemy')" % ('3' if six.PY3 else ""))

View on GitHub (pinned to 0a35b20e39)

When it happens

Trigger: Thrown at lib/utils/sqlalchemy.py:93 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/b9eb557da216fcef. Report an issue: GitHub.