Hi, I'm experiencing a similar problem in my program (Sqlalchemy 0.8.4). In my case no blob column is involved, the problem seems to be related to presence of a foreign key in the target table. Here is the traceback of the error:
File "C:\Python27\lib\site-packages\sqlalchemy\orm\session.py", line 721, in commit self.transaction.commit() File "C:\Python27\lib\site-packages\sqlalchemy\orm\session.py", line 354, in commit self._prepare_impl() File "C:\Python27\lib\site-packages\sqlalchemy\orm\session.py", line 334, in _prepare_impl self.session.flush() File "C:\Python27\lib\site-packages\sqlalchemy\orm\session.py", line 1818, in flush self._flush(objects) File "C:\Python27\lib\site-packages\sqlalchemy\orm\session.py", line 1936, in _flush transaction.rollback(_capture_exception=True) File "C:\Python27\lib\site-packages\sqlalchemy\util\langhelpers.py", line 58, in __exit__ compat.reraise(exc_type, exc_value, exc_tb) File "C:\Python27\lib\site-packages\sqlalchemy\orm\session.py", line 1900, in _flush flush_context.execute() File "C:\Python27\lib\site-packages\sqlalchemy\orm\unitofwork.py", line 372, in execute rec.execute(self) File "C:\Python27\lib\site-packages\sqlalchemy\orm\unitofwork.py", line 525, in execute uow File "C:\Python27\lib\site-packages\sqlalchemy\orm\persistence.py", line 64, in save_obj table, insert) File "C:\Python27\lib\site-packages\sqlalchemy\orm\persistence.py", line 569, in _emit_insert_statements execute(statement, params) File "C:\Python27\lib\site-packages\sqlalchemy\engine\base.py", line 662, in execute params) File "C:\Python27\lib\site-packages\sqlalchemy\engine\base.py", line 761, in _execute_clauseelement compiled_sql, distilled_params File "C:\Python27\lib\site-packages\sqlalchemy\engine\base.py", line 828, in _execute_context None, None) File "C:\Python27\lib\site-packages\sqlalchemy\engine\base.py", line 1024, in _handle_dbapi_exception exc_info File "C:\Python27\lib\site-packages\sqlalchemy\util\compat.py", line 196, in raise_from_cause reraise(type(exception), exception, tb=exc_tb) File "C:\Python27\lib\site-packages\sqlalchemy\engine\base.py", line 824, in _execute_context context = constructor(dialect, self, conn, *args) File "C:\Python27\lib\site-packages\sqlalchemy\engine\default.py", line 446, in _init_compiled self.__process_defaults() File "C:\Python27\lib\site-packages\sqlalchemy\engine\default.py", line 821, in __process_defaults val = self.get_insert_default(c) File "C:\Python27\lib\site-packages\sqlalchemy\engine\default.py", line 777, in get_insert_default return self._exec_default(column.default, column.type) File "C:\Python27\lib\site-packages\sqlalchemy\engine\default.py", line 761, in _exec_default return self.fire_sequence(default, type_) StatementError: 'SQLiteExecutionContext' object has no attribute 'fire_sequence' (original cause: AttributeError: 'SQLiteExecutionContext' object has no attribute 'fire_sequence') u'INSERT INTO dataset (set_id, user_id, label, set_table, nam_table, val_table, datasource, info) VALUES (?, ?, ?, ?, ?, ?, ?, ?)' [{'info': None, 'user_id': 1, 'val_table': u'val_table', 'label': u'tab1', 'nam_tab': u'nam_table', 'set_table': u'tab1', 'datasource': None}] The construct which causes the error is this: dataset.append_constraint(sa.ForeignKeyConstraint([dataset.c.set_id], [task.c.set_id])) If I remove this line of code everything goes well (but of course I cannot set up the relationship between the dataset table and the task table). Any help is really appreciated. -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at http://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/groups/opt_out.