That is very strange. I am from a few hours struggling with this ...
stripped application on the first ...
There is nothing else.
Ordinary simple table. On it a select and an insert (with ORM, of
course).

Rest a while and try to prepare a complete test case. Unless I find a
solution on the way :]


On Jul 20, 7:38 pm, Michael Bayer <mike...@zzzcomputing.com> wrote:
> Can I ask that you put a little more effort into providing context / mappings 
> / specifics for this stack trace (see guidelines 
> athttp://www.sqlalchemy.org/support.html#mailinglist) ?  Clearly If I make a 
> sample Opt() class with two fields and commit it, no such error occurs.  
> There is some suggestion of inappropriate assignment of a string or int to an 
> attribute which expects the opposite here.
>
> On Jul 20, 2011, at 1:26 PM, ddarko wrote:
>
>
>
>
>
>
>
> > declarative_base
>
> > tmp = session.query(Opt).all()
> > session.add(Opt(key='a', value='b'))
> > session.commit()
> >  File "/usr/local/lib/python3.2/dist-packages/SQLAlchemy-0.7.1-
> > py3.2.egg/sqlalchemy/orm/session.py", line 617, in commit
> >    self.transaction.commit()
> >  File "/usr/local/lib/python3.2/dist-packages/SQLAlchemy-0.7.1-
> > py3.2.egg/sqlalchemy/orm/session.py", line 293, in commit
> >    self._prepare_impl()
> >  File "/usr/local/lib/python3.2/dist-packages/SQLAlchemy-0.7.1-
> > py3.2.egg/sqlalchemy/orm/session.py", line 277, in _prepare_impl
> >    self.session.flush()
> >  File "/usr/local/lib/python3.2/dist-packages/SQLAlchemy-0.7.1-
> > py3.2.egg/sqlalchemy/orm/session.py", line 1473, in flush
> >    self._flush(objects)
> >  File "/usr/local/lib/python3.2/dist-packages/SQLAlchemy-0.7.1-
> > py3.2.egg/sqlalchemy/orm/session.py", line 1542, in _flush
> >    flush_context.execute()
> >  File "/usr/local/lib/python3.2/dist-packages/SQLAlchemy-0.7.1-
> > py3.2.egg/sqlalchemy/orm/unitofwork.py", line 327, in execute
> >    rec.execute(self)
> >  File "/usr/local/lib/python3.2/dist-packages/SQLAlchemy-0.7.1-
> > py3.2.egg/sqlalchemy/orm/unitofwork.py", line 471, in execute
> >    uow
> >  File "/usr/local/lib/python3.2/dist-packages/SQLAlchemy-0.7.1-
> > py3.2.egg/sqlalchemy/orm/mapper.py", line 1870, in _save_obj
> >    for state in _sort_states(states):
> >  File "/usr/local/lib/python3.2/dist-packages/SQLAlchemy-0.7.1-
> > py3.2.egg/sqlalchemy/orm/mapper.py", line 2808, in _sort_states
> >    return sorted(states, key=operator.attrgetter('sort_key'))
> > TypeError: unorderable types: str() < int()
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "sqlalchemy" group.
> > To post to this group, send email to sqlalchemy@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > sqlalchemy+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/sqlalchemy?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@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.

Reply via email to