Hi,
I'm using sqlalchemy 0.9.7 and cx_oracle 5.1.3 and every once in
a while (inconsistent), I get the following error:
Traceback (most recent call last):
File
"/opt/enigmai/ve/python-2.7.6/lib/python2.7/site-packages/sqlalchemy/orm/session.py",
line 1919, in flush
self._flush(objects)
File
"/opt/enigmai/ve/python-2.7.6/lib/python2.7/site-packages/sqlalchemy/orm/session.py",
line 2037, in _flush
transaction.rollback(_capture_exception=True)
File
"/opt/enigmai/ve/python-2.7.6/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.py",
line 60, in __exit__
compat.reraise(exc_type, exc_value, exc_tb)
File
"/opt/enigmai/ve/python-2.7.6/lib/python2.7/site-packages/sqlalchemy/orm/session.py",
line 2001, in _flush
flush_context.execute()
File
"/opt/enigmai/ve/python-2.7.6/lib/python2.7/site-packages/sqlalchemy/orm/unitofwork.py",
line 372, in execute
rec.execute(self)
File
"/opt/enigmai/ve/python-2.7.6/lib/python2.7/site-packages/sqlalchemy/orm/unitofwork.py",
line 526, in execute
uow
File
"/opt/enigmai/ve/python-2.7.6/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py",
line 65, in save_obj
mapper, table, insert)
File
"/opt/enigmai/ve/python-2.7.6/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py",
line 602, in _emit_insert_statements
execute(statement, params)
File
"/opt/enigmai/ve/python-2.7.6/lib/python2.7/site-packages/sqlalchemy/engine/base.py",
line 729, in execute
return meth(self, multiparams, params)
File
"/opt/enigmai/ve/python-2.7.6/lib/python2.7/site-packages/sqlalchemy/sql/elements.py",
line 321, in _execute_on_connection
return connection._execute_clauseelement(self, multiparams,
params)
File
"/opt/enigmai/ve/python-2.7.6/lib/python2.7/site-packages/sqlalchemy/engine/base.py",
line 826, in _execute_clauseelement
compiled_sql, distilled_params
File
"/opt/enigmai/ve/python-2.7.6/lib/python2.7/site-packages/sqlalchemy/engine/base.py",
line 978, in _execute_context
context._fetch_implicit_returning(result)
File
"/opt/enigmai/ve/python-2.7.6/lib/python2.7/site-packages/sqlalchemy/engine/default.py",
line 815, in _fetch_implicit_returning
ipk.append(row[c])
File
"/opt/enigmai/ve/python-2.7.6/lib/python2.7/site-packages/sqlalchemy/engine/result.py",
line 331, in _key_fallback
expression._string_or_unprintable(key))
NoSuchColumnError: "Could not locate column in row for column
't_shift_employee_change.id <http://t_shift_employee_change.id>'"
[30/Apr/2015:15:55:17] EXCEPTION
# ---- EXCEPTION DESCRIPTION BEGIN ---- #
# ---- Type ---- #
NoSuchColumnError
# ---- Detail ---- #
"Could not locate column in row for column
't_shift_employee_change.id <http://t_shift_employee_change.id>'"
# ---- Traceback ---- #
File
"/opt/enigmai/ve/python-2.7.6/lib/python2.7/site-packages/sqlalchemy/orm/session.py",
line 1919, in flush
self._flush(objects)
-
File
"/opt/enigmai/ve/python-2.7.6/lib/python2.7/site-packages/sqlalchemy/orm/session.py",
line 2037, in _flush
transaction.rollback(_capture_exception=True)
-
File
"/opt/enigmai/ve/python-2.7.6/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.py",
line 60, in __exit__
compat.reraise(exc_type, exc_value, exc_tb)
-
File
"/opt/enigmai/ve/python-2.7.6/lib/python2.7/site-packages/sqlalchemy/orm/session.py",
line 2001, in _flush
flush_context.execute()
-
File
"/opt/enigmai/ve/python-2.7.6/lib/python2.7/site-packages/sqlalchemy/orm/unitofwork.py",
line 372, in execute
rec.execute(self)
-
File
"/opt/enigmai/ve/python-2.7.6/lib/python2.7/site-packages/sqlalchemy/orm/unitofwork.py",
line 526, in execute
uow
-
File
"/opt/enigmai/ve/python-2.7.6/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py",
line 65, in save_obj
mapper, table, insert)
-
File
"/opt/enigmai/ve/python-2.7.6/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py",
line 602, in _emit_insert_statements
execute(statement, params)
-
File
"/opt/enigmai/ve/python-2.7.6/lib/python2.7/site-packages/sqlalchemy/engine/base.py",
line 729, in execute
return meth(self, multiparams, params)
-
File
"/opt/enigmai/ve/python-2.7.6/lib/python2.7/site-packages/sqlalchemy/sql/elements.py",
line 321, in _execute_on_connection
return connection._execute_clauseelement(self, multiparams,
params)
-
File
"/opt/enigmai/ve/python-2.7.6/lib/python2.7/site-packages/sqlalchemy/engine/base.py",
line 826, in _execute_clauseelement
compiled_sql, distilled_params
-
File
"/opt/enigmai/ve/python-2.7.6/lib/python2.7/site-packages/sqlalchemy/engine/base.py",
line 978, in _execute_context
context._fetch_implicit_returning(result)
-
File
"/opt/enigmai/ve/python-2.7.6/lib/python2.7/site-packages/sqlalchemy/engine/default.py",
line 815, in _fetch_implicit_returning
ipk.append(row[c])
-
File
"/opt/enigmai/ve/python-2.7.6/lib/python2.7/site-packages/sqlalchemy/engine/result.py",
line 331, in _key_fallback
expression._string_or_unprintable(key))
# ---- EXCEPTION DESCRIPTION END ---- #
I saw several posts about this issue but I didn't find a solution.
Restarting my service seems to fix the issue for a while.
BTW: This error is linked to a mixin class I've created for
track-changes based on the version mixin from /
http://docs.sqlalchemy.org/en/latest/_modules/examples/versioned_history/history_meta.html
<http://docs.sqlalchemy.org/en/latest/_modules/examples/versioned_history/history_meta.html>
/