-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

This code fails:-

from sqlalchemy import event, create_engine

def before_execute(conn, clauseelement, multiparams, params):
    log.info("Received statement: %s" % clauseelement)

engine = create_engine('mysql://root@localhost')
connection = engine.connect()
event.listen(connection, "before_execute", before_execute)

with:-

Traceback (most recent call last):
  File "test.py", line 8, in <module>
    event.listen(connection, "before_execute", before_execute)
  File "/usr/local/lib/python2.7/dist-packages/SQLAlchemy-0.7.7-py2.7-linux-
x86_64.egg/sqlalchemy/event.py", line 40, in listen
    (identifier,target))
sqlalchemy.exc.InvalidRequestError: No such event 'before_execute' for 
target '<sqlalchemy.engine.base.Connection object at 0x2a31450>'

- -- 
Fayaz Yusuf Khan
Cloud architect, Dexetra SS, India
fayaz.yusuf.khan_AT_gmail_DOT_com, fayaz_AT_dexetra_DOT_com
+91-9746-830-823
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQEcBAEBAgAGBQJP3ZvVAAoJEFp5PFlEQdUR6QMIAMyhJuHysLwCwKs3ilQ4HI7e
3RaAGIbd3XNoBCekC6knyvHSwkJImkxHxL28UQ4uJTpJtXMRY/YUqZMFiu9Owm7I
BDyAudzOz/pSe5NkQGnvOxlcR0RFB/qkfDw+xTTGrUDxeGLSpEZfhrJyTkKEktdV
RJLWba/JLsOq5tw0djxRT2oJ0LNADltVMRo+G8TpB45nRBLEY68exE8Zup/3od3d
eHyiQQDD7ffz9MUzd+6YktC0vu30LNoj/1XkqzbFeBcZqq8CqkmfM2jQAWUheSlR
sqiqBzPFDs4a+xxXl2iTlE2Syh1H0zxynhQbd2ldnl04UbZ1HClkDrh51OKcL2M=
=M31b
-----END PGP SIGNATURE-----


-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to