AttributeError: 'list' object has no attribute '_sa_instance_state'

218 views
Skip to first unread message

nickph

unread,
Nov 23, 2011, 10:09:03 AM11/23/11
to sprox
I'm using sprox through tgext. I've come across this issue when trying
to change an item in a list (sqlalchemy 0.7.3). Any ideas where I'm
going wrong?

Thanks:

Module sprox.sa.provider:495 in update view
>> self._remove_related_empty_params(obj, params, omit_fields)
Module sprox.sa.provider:465 in _remove_related_empty_params
view
>> setattr(obj, relation, [])
Module sqlalchemy.orm.attributes:155 in __set__ view
>> instance_dict(instance), value, None)
Module sqlalchemy.orm.attributes:646 in set view
>> value = self.fire_replace_event(state, dict_, value, old, initiator)
Module sqlalchemy.orm.attributes:666 in fire_replace_event
view
>> value = fn(state, value, previous, initiator or self)
Module sqlalchemy.orm.unitofwork:63 in set_ view
>> newvalue_state = attributes.instance_state(newvalue)
AttributeError: 'list' object has no attribute '_sa_instance_state'

Chris Perkins

unread,
Nov 23, 2011, 1:53:21 PM11/23/11
to sp...@googlegroups.com
Not sure. Can you provide your model? Is this your entire traceback?
Have you tried Sprox 0.7 (released to pypi but not officially
released).

cheers.
-chris

> --
> You received this message because you are subscribed to the Google Groups "sprox" group.
> To post to this group, send email to sp...@googlegroups.com.
> To unsubscribe from this group, send email to sprox+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/sprox?hl=en.
>
>

Reply all
Reply to author
Forward
0 new messages