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'"
[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'"
# ---- 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))
http://docs.sqlalchemy.org/en/latest/_modules/examples/versioned_history/history_meta.html
--
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+...@googlegroups.com.
To post to this group, send email to sqlal...@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.
Hi Michael,Thank you very much for your fast response. I will give it a try.
I tried to remove unneeded stuff but I think that the problem is in the track_changes mixin as I never got this error before using it.If you need more stuff or do find something, I'd be happy to know.
Is there any danger using the implicit_returning=False on the engine? Or is it the same?
--
You received this message because you are subscribed to a topic in the Google Groups "sqlalchemy" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sqlalchemy/TpJ86vA64DM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sqlalchemy+...@googlegroups.com.
Is there any danger using the implicit_returning=False on the engine? Or is it the same?
For some reason, I get the following error while using this attribute on the table:
python-2.7.6/lib/python2.7/site-packages/sqlalchemy/sql/schema.py:500: SAWarning: Can't validate argument 'implicit_returning'; can't locate any SQLAlchemy dialect named 'implicit'
self._validate_dialect_kwargs(kwargs)
I should note that the application I'm developing uses other DB's also (e.g mysql) nd that I got this error while checking the application on mysql.
For some reason, I get the following error while using this attribute on the table:
python-2.7.6/lib/python2.7/site-packages/sqlalchemy/sql/schema.py:500: SAWarning: Can't validate argument 'implicit_returning'; can't locate any SQLAlchemy dialect named 'implicit'
self._validate_dialect_kwargs(kwargs)
I should note that the application I'm developing uses other DB's also (e.g mysql) nd that I got this error while checking the application on mysql.
That part did work, but I keep a table class also (just so the table will be created if it doesn't exist), but adding the argument to the table args generates the error:
class ShiftEmployeeChange(Base):
__tablename__ = "t_shift_employee_change"
__table_args__ = {'extend_existing': True, 'implicit_returning':False}
id = sa.Column(Identifier, sa.Sequence('%s_id_seq' % __tablename__), nullable=False, primary_key=True)
field1 = sa.Column(sa.BigInteger, nullable=False)
field2 = sa.Column(sa.BigInteger)
field3 = sa.Column(sa.Date, nullable=False)
field4 = sa.Column(sa.Boolean, default=False)
changed_at = sa.Column(sa.DateTime, nullable=False, default=datetime.datetime.now)
changed_by = sa.Column(sa.BigInteger)
Do I need the argument there also?
That part did work, but I keep a table class also (just so the table will be created if it doesn't exist), but adding the argument to the table args generates the error:
class ShiftEmployeeChange(Base):
__tablename__ = "t_shift_employee_change"
__table_args__ = {'extend_existing': True, 'implicit_returning':False}
id = sa.Column(Identifier, sa.Sequence('%s_id_seq' % __tablename__), nullable=False, primary_key=True)
field1 = sa.Column(sa.BigInteger, nullable=False)
field2 = sa.Column(sa.BigInteger)
field3 = sa.Column(sa.Date, nullable=False)
field4 = sa.Column(sa.Boolean, default=False)
changed_at = sa.Column(sa.DateTime, nullable=False, default=datetime.datetime.now)
changed_by = sa.Column(sa.BigInteger)
Do I need the argument there also?