All pastes #912849 Raw Edit

Miscellany

public text v1 · immutable
·published 2008-02-21 17:56 UTC
rendered paste body
In [22]: p.emails['primary'] = 'mmcgrath@redhat.com'
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)

/home/mmcgrath/git/fedora-infrastructure/fas/fas/<ipython console> in <module>()

/usr/lib/python2.5/site-packages/sqlalchemy/orm/collections.py in __setitem__(self, key, value, _sa_initiator)
    910             if key in self:
    911                 __del(self, self[key], _sa_initiator)
--> 912             __set(self, value, _sa_initiator)
    913             fn(self, key, value)
    914         _tidy(__setitem__)

/usr/lib/python2.5/site-packages/sqlalchemy/orm/collections.py in __set(collection, item, _sa_initiator)
    761         executor = getattr(collection, '_sa_adapter', None)
    762         if executor:
--> 763             getattr(executor, 'fire_append_event')(item, _sa_initiator)
    764
    765 def __del(collection, item, _sa_initiator=None):

/usr/lib/python2.5/site-packages/sqlalchemy/orm/collections.py in fire_append_event(self, item, initiator)
    506
    507         if initiator is not False and item is not None:
--> 508             self.attr.fire_append_event(self.owner_state, item, initiator)
    509
    510     def fire_remove_event(self, item, initiator=None):

/usr/lib/python2.5/site-packages/sqlalchemy/orm/attributes.py in fire_append_event(self, state, value, initiator)
    254         state.modified = True
    255         if self.trackparent and value is not None:
--> 256             self.sethasparent(value._state, True)
    257         obj = state.obj()
    258         for ext in self.extensions:

AttributeError: 'str' object has no attribute '_state'