I've tried it without the loop and it fails about 75% of the time with the same traceback. I'm also getting this exception on another ORM object that has a string column and four timestamp columns (and isn't updated in a loop). Test updating that object also gives me the same exception about 75% of the time on flush.
Neither ORM object has any relationships or anything other than straight column definitions.
File "/opt/certwise-lcs/eggs/lcs.web.events-1.0.0-py2.7.egg/lcs/web/events/utility.py", line 296, in _dead
session.commit()
File "/opt/certwise-lcs/eggs/SQLAlchemy-1.0.2-py2.7-linux-x86_64.egg/sqlalchemy/orm/session.py", line 790, in commit
self.transaction.commit()
File "/opt/certwise-lcs/eggs/SQLAlchemy-1.0.2-py2.7-linux-x86_64.egg/sqlalchemy/orm/session.py", line 392, in commit
self._prepare_impl()
File "/opt/certwise-lcs/eggs/SQLAlchemy-1.0.2-py2.7-linux-x86_64.egg/sqlalchemy/orm/session.py", line 372, in _prepare_impl
self.session.flush()
File "/opt/certwise-lcs/eggs/SQLAlchemy-1.0.2-py2.7-linux-x86_64.egg/sqlalchemy/orm/session.py", line 2004, in flush
self._flush(objects)
File "/opt/certwise-lcs/eggs/SQLAlchemy-1.0.2-py2.7-linux-x86_64.egg/sqlalchemy/orm/session.py", line 2122, in _flush
transaction.rollback(_capture_exception=True)
File "/opt/certwise-lcs/eggs/SQLAlchemy-1.0.2-py2.7-linux-x86_64.egg/sqlalchemy/util/langhelpers.py", line 60, in __exit__
compat.reraise(exc_type, exc_value, exc_tb)
File "/opt/certwise-lcs/eggs/SQLAlchemy-1.0.2-py2.7-linux-x86_64.egg/sqlalchemy/orm/session.py", line 2086, in _flush
flush_context.execute()
File "/opt/certwise-lcs/eggs/SQLAlchemy-1.0.2-py2.7-linux-x86_64.egg/sqlalchemy/orm/unitofwork.py", line 373, in execute
rec.execute(self)
File "/opt/certwise-lcs/eggs/SQLAlchemy-1.0.2-py2.7-linux-x86_64.egg/sqlalchemy/orm/unitofwork.py", line 532, in execute
uow
File "/opt/certwise-lcs/eggs/SQLAlchemy-1.0.2-py2.7-linux-x86_64.egg/sqlalchemy/orm/persistence.py", line 170, in save_obj
mapper, table, update)
File "/opt/certwise-lcs/eggs/SQLAlchemy-1.0.2-py2.7-linux-x86_64.egg/sqlalchemy/orm/persistence.py", line 613, in _emit_update_statements
lambda rec: (
File "/opt/certwise-lcs/eggs/SQLAlchemy-1.0.2-py2.7-linux-x86_64.egg/sqlalchemy/orm/persistence.py", line 456, in _collect_update_commands
value, state.committed_state[propkey]):
File "/opt/certwise-lcs/eggs/SQLAlchemy-1.0.2-py2.7-linux-x86_64.egg/sqlalchemy/sql/elements.py", line 2726, in __bool__
raise TypeError("Boolean value of this clause is not defined")
exceptions.TypeError: Boolean value of this clause is not defined