
Traceback (most recent call last):

 "bin/py", line 61, in <module>
exec(compile(__file__f.read(), __file__, "exec"))

 "connection_event_bug.py", line 12, in <module>
event.remove(connection, 'after_cursor_execute', after_cursor_execute)

 "/Users/lrowe/.buildout/eggs/SQLAlchemy-0.8.0-py2.7-macosx-10.6-intel.egg/sqlalchemy/event.py", line 76, in remove
for tgt in evt_cls._accept_with(target):
TypeError: 'Connection' object is not iterable
Traceback (most recent call last):


 "/home/aman/Code/Babylon-Farm/Babylon-Farm/code/db/db_actions2.py", line 72, in <module>

for entry in results:


 "/home/aman/anaconda3/envs/sbir/lib/python3.7/site-packages/peewee-3.10.0-py3.7-linux-x86_64.egg/peewee.py", line 6651, in __iter__

self.execute()


 "/home/aman/anaconda3/envs/sbir/lib/python3.7/site-packages/peewee-3.10.0-py3.7-linux-x86_64.egg/peewee.py", line 1809, in inner

return method(self, database, *args, **kwargs)


 "/home/aman/anaconda3/envs/sbir/lib/python3.7/site-packages/peewee-3.10.0-py3.7-linux-x86_64.egg/peewee.py", line 1880, in execute

return self._execute(database)


 "/home/aman/anaconda3/envs/sbir/lib/python3.7/site-packages/peewee-3.10.0-py3.7-linux-x86_64.egg/peewee.py", line 2051, in _execute

cursor = database.execute(self)


 "/home/aman/anaconda3/envs/sbir/lib/python3.7/site-packages/peewee-3.10.0-py3.7-linux-x86_64.egg/peewee.py", line 3015, in execute

return self.execute_sql(sql, params, commit=commit)


 "/home/aman/anaconda3/envs/sbir/lib/python3.7/site-packages/peewee-3.10.0-py3.7-linux-x86_64.egg/peewee.py", line 3009, in execute_sql

self.commit()


 "/home/aman/anaconda3/envs/sbir/lib/python3.7/site-packages/peewee-3.10.0-py3.7-linux-x86_64.egg/peewee.py", line 2780, in __exit__

reraise(new_type, new_type(*exc_args), traceback)


 "/home/aman/anaconda3/envs/sbir/lib/python3.7/site-packages/peewee-3.10.0-py3.7-linux-x86_64.egg/peewee.py", line 183, in reraise

raise value.with_traceback(tb)


 "/home/aman/anaconda3/envs/sbir/lib/python3.7/site-packages/peewee-3.10.0-py3.7-linux-x86_64.egg/peewee.py", line 3002, in execute_sql

cursor.execute(sql, params or ())
peewee.OperationalError: no such function: median
