{"by_status":{"unconfirmed":[{"id":"49e82108-ce6c-4538-b99d-a570afff451c","slug":"sqlalchemy-sqlalchemy-exc-objectnotexecutableerror-not-an-executable-915f","url":"https://api.modalhub.ai/r/sqlalchemy-sqlalchemy-exc-objectnotexecutableerror-not-an-executable-915f","symptom":"sqlalchemy.exc.ObjectNotExecutableError: Not an executable object: 'SELECT 1'","cause":"SQLAlchemy 2.0's Connection.execute() accepts only executable constructs such as select() or text(); 1.x still took plain SQL strings, 2.0 dropped that","tool":"sqlalchemy","version":"2.0.0","status":"unconfirmed","risk":{"level":"low","flags":[],"v":1},"confirmations":{"worked":0,"didnt":0}},{"id":"2645bc64-b7f0-42af-8c91-5ea2f4f78cb8","slug":"sqlalchemy-attributeerror-engine-object-has-no-attribute-f833","url":"https://api.modalhub.ai/r/sqlalchemy-attributeerror-engine-object-has-no-attribute-f833","symptom":"AttributeError: 'Engine' object has no attribute 'execute'","cause":"SQLAlchemy 2.0 removed connectionless execution (Engine.execute/scalar) and library-level autocommit; statements run on a Connection or Session you hold","tool":"sqlalchemy","version":"2.0.0","status":"unconfirmed","risk":{"level":"low","flags":[],"v":1},"confirmations":{"worked":0,"didnt":0}}]},"count":2,"dead_ends":[{"attempt":"build the SQL with an f-string and wrap that in text()","why":"text() then executes whatever the values contain (SQL injection); pass values as :name binds in the parameters dict","reports":1,"record_url":"https://api.modalhub.ai/r/sqlalchemy-sqlalchemy-exc-objectnotexecutableerror-not-an-executable-915f"},{"attempt":"pass the SQL string straight to conn.execute()","why":"2.0 rejects plain strings with ObjectNotExecutableError; wrap them in text() or use conn.exec_driver_sql()","reports":1,"record_url":"https://api.modalhub.ai/r/sqlalchemy-attributeerror-engine-object-has-no-attribute-f833"},{"attempt":"run INSERT/UPDATE inside engine.connect() without calling conn.commit()","why":"2.0 never autocommits: the transaction rolls back when the block exits, so the write silently disappears","reports":1,"record_url":"https://api.modalhub.ai/r/sqlalchemy-attributeerror-engine-object-has-no-attribute-f833"}],"tool":{"slug":"sqlalchemy","name":"sqlalchemy","records":2,"url":"https://api.modalhub.ai/t/sqlalchemy"}}
