> -----Original Message----- > From: sqlalchemy@googlegroups.com > [mailto:sqlalch...@googlegroups.com] On Behalf Of Adam Tauno Williams > Sent: 03 February 2010 12:17 > To: sqlalchemy@googlegroups.com > Subject: [sqlalchemy] Getting useful error messages > > Attempting, again, to get a declarative representation of a two table > entity > <http://groups.google.com/group/sqlalchemy/browse_thread/threa > d/b0ce69e368b444dd/bcb9c287f3e9d939?lnk=raot>, but I keep > getting errors like: > -------------------------------- > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File > "/usr/lib/python2.6/site-packages/SQLAlchemy-0.5.4p2-py2.6.egg /sqlalchemy/orm/session.py", line 895, in query > return self._query_cls(entities, self, **kwargs) > File > "/usr/lib/python2.6/site-packages/SQLAlchemy-0.5.4p2-py2.6.egg /sqlalchemy/orm/query.py", line 91, in __init__ > self._set_entities(entities) > File > "/usr/lib/python2.6/site-packages/SQLAlchemy-0.5.4p2-py2.6.egg /sqlalchemy/orm/query.py", line 98, in _set_entities > entity_wrapper(self, ent) > File > "/usr/lib/python2.6/site-packages/SQLAlchemy-0.5.4p2-py2.6.egg /sqlalchemy/orm/query.py", line 2017, in __init__ > raise sa_exc.InvalidRequestError("Invalid column > expression '%r'" % > column) > sqlalchemy.exc.InvalidRequestError: Invalid column expression '<class > '__main__.TaskAction'>' > ------------------------------------------------- > - which is useless [I'm having Java flashbacks]. Is there a > way to get > more useful debugging information from sqlalchemy? Like maybe what > expression '%r' was or the column in question? >
The line below the one you're complaining about is telling you what the column in question is: Invalid column expression '<class '__main__.TaskAction'>' So somehow, you've passed your TaskAction class in a place where SA is expecting a column expression. I think we'd need to see the command that you actually typed in to work out what the problem is. Simon -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.