Test to make sure that Dependency is working properly.
Traceback (most recent call last):
File "/home/keien/dev/wordseer_flask/tests/testuploader.py", line 100, in test_model_dependency
dependency.sentences = [sentence1, sentence2]
File "/home/keien/dev/wordseer_flask/venv/local/lib/python2.7/site-packages/sqlalchemy/ext/associationproxy.py", line 275, in set
self._set(proxy, values)
File "/home/keien/dev/wordseer_flask/venv/local/lib/python2.7/site-packages/sqlalchemy/ext/associationproxy.py", line 344, in _set
proxy.extend(values)
File "/home/keien/dev/wordseer_flask/venv/local/lib/python2.7/site-packages/sqlalchemy/ext/associationproxy.py", line 603, in extend
self.append(v)
File "/home/keien/dev/wordseer_flask/venv/local/lib/python2.7/site-packages/sqlalchemy/ext/associationproxy.py", line 594, in append
item = self._create(value)
File "/home/keien/dev/wordseer_flask/venv/local/lib/python2.7/site-packages/sqlalchemy/ext/associationproxy.py", line 520, in _create
return self.creator(value)
File "", line 4, in init
File "/home/keien/dev/wordseer_flask/venv/local/lib/python2.7/site-packages/sqlalchemy/orm/state.py", line 196, in _initialize_instance
return manager.original_init(_mixed[1:], *_kwargs)
File "/home/keien/dev/wordseer_flask/app/models.py", line 734, in init
self.dependency = dependency
File "/home/keien/dev/wordseer_flask/venv/local/lib/python2.7/site-packages/sqlalchemy/orm/attributes.py", line 220, in set
instance_dict(instance), value, None)
File "/home/keien/dev/wordseer_flask/venv/local/lib/python2.7/site-packages/sqlalchemy/orm/attributes.py", line 780, in set
value = self.fire_replaceevent(state, dict, value, old, initiator)
File "/home/keien/dev/wordseer_flask/venv/local/lib/python2.7/site-packages/sqlalchemy/orm/attributes.py", line 801, in fire_replace_event
value = fn(state, value, previous, initiator or self._replace_token)
File "/home/keien/dev/wordseer_flask/venv/local/lib/python2.7/site-packages/sqlalchemy/orm/attributes.py", line 1112, in emit_backref_from_scalar_set_event
passive=PASSIVE_NO_FETCH)
File "/home/keien/dev/wordseer_flask/venv/local/lib/python2.7/site-packages/sqlalchemy/orm/attributes.py", line 946, in append
collection.append_with_event(value, initiator)
File "/home/keien/dev/wordseer_flask/venv/local/lib/python2.7/site-packages/sqlalchemy/orm/collections.py", line 651, in append_with_event
self._data()._sa_appender(item, _sa_initiator=initiator)
File "/home/keien/dev/wordseer_flask/venv/local/lib/python2.7/site-packages/sqlalchemy/orm/collections.py", line 1043, in append
item = __set(self, item, _sa_initiator)
File "/home/keien/dev/wordseer_flask/venv/local/lib/python2.7/site-packages/sqlalchemy/orm/collections.py", line 1015, in __set
item = executor.fire_append_event(item, _sa_initiator)
File "/home/keien/dev/wordseer_flask/venv/local/lib/python2.7/site-packages/sqlalchemy/orm/collections.py", line 714, in fire_append_event
item, initiator)
File "/home/keien/dev/wordseer_flask/venv/local/lib/python2.7/site-packages/sqlalchemy/orm/attributes.py", line 895, in fire_append_event
value = fn(state, value, initiator or self._append_token)
File "/home/keien/dev/wordseer_flask/venv/local/lib/python2.7/site-packages/sqlalchemy/orm/attributes.py", line 1125, in emit_backref_from_collection_append_event
_acceptable_key_err(state, initiator, child_impl)
File "/home/keien/dev/wordseer_flask/venv/local/lib/python2.7/site-packages/sqlalchemy/orm/attributes.py", line 1076, in _acceptable_key_err
attribute.impl.parent_token
ValueError: Bidirectional attribute conflict detected: Passing object <Sentence at 0x2fb0490> to attribute "DependencyInSentence.dependency" triggers a modify event on attribute "DependencyInSentence.sentence" via the backref "Sentence.dependency_in_sentence".
ERROR: test_model_dependency (testuploader.TestModels)
Test to make sure that Dependency is working properly.
Traceback (most recent call last): File "/home/keien/dev/wordseer_flask/tests/testuploader.py", line 100, in test_model_dependency dependency.sentences = [sentence1, sentence2] File "/home/keien/dev/wordseer_flask/venv/local/lib/python2.7/site-packages/sqlalchemy/ext/associationproxy.py", line 275, in set self._set(proxy, values) File "/home/keien/dev/wordseer_flask/venv/local/lib/python2.7/site-packages/sqlalchemy/ext/associationproxy.py", line 344, in _set proxy.extend(values) File "/home/keien/dev/wordseer_flask/venv/local/lib/python2.7/site-packages/sqlalchemy/ext/associationproxy.py", line 603, in extend self.append(v) File "/home/keien/dev/wordseer_flask/venv/local/lib/python2.7/site-packages/sqlalchemy/ext/associationproxy.py", line 594, in append item = self._create(value) File "/home/keien/dev/wordseer_flask/venv/local/lib/python2.7/site-packages/sqlalchemy/ext/associationproxy.py", line 520, in _create return self.creator(value) File "", line 4, in init
File "/home/keien/dev/wordseer_flask/venv/local/lib/python2.7/site-packages/sqlalchemy/orm/state.py", line 196, in _initialize_instance
return manager.original_init(_mixed[1:], *_kwargs)
File "/home/keien/dev/wordseer_flask/app/models.py", line 734, in init
self.dependency = dependency
File "/home/keien/dev/wordseer_flask/venv/local/lib/python2.7/site-packages/sqlalchemy/orm/attributes.py", line 220, in set
instance_dict(instance), value, None)
File "/home/keien/dev/wordseer_flask/venv/local/lib/python2.7/site-packages/sqlalchemy/orm/attributes.py", line 780, in set
value = self.fire_replaceevent(state, dict, value, old, initiator)
File "/home/keien/dev/wordseer_flask/venv/local/lib/python2.7/site-packages/sqlalchemy/orm/attributes.py", line 801, in fire_replace_event
value = fn(state, value, previous, initiator or self._replace_token)
File "/home/keien/dev/wordseer_flask/venv/local/lib/python2.7/site-packages/sqlalchemy/orm/attributes.py", line 1112, in emit_backref_from_scalar_set_event
passive=PASSIVE_NO_FETCH)
File "/home/keien/dev/wordseer_flask/venv/local/lib/python2.7/site-packages/sqlalchemy/orm/attributes.py", line 946, in append
collection.append_with_event(value, initiator)
File "/home/keien/dev/wordseer_flask/venv/local/lib/python2.7/site-packages/sqlalchemy/orm/collections.py", line 651, in append_with_event
self._data()._sa_appender(item, _sa_initiator=initiator)
File "/home/keien/dev/wordseer_flask/venv/local/lib/python2.7/site-packages/sqlalchemy/orm/collections.py", line 1043, in append
item = __set(self, item, _sa_initiator)
File "/home/keien/dev/wordseer_flask/venv/local/lib/python2.7/site-packages/sqlalchemy/orm/collections.py", line 1015, in __set
item = executor.fire_append_event(item, _sa_initiator)
File "/home/keien/dev/wordseer_flask/venv/local/lib/python2.7/site-packages/sqlalchemy/orm/collections.py", line 714, in fire_append_event
item, initiator)
File "/home/keien/dev/wordseer_flask/venv/local/lib/python2.7/site-packages/sqlalchemy/orm/attributes.py", line 895, in fire_append_event
value = fn(state, value, initiator or self._append_token)
File "/home/keien/dev/wordseer_flask/venv/local/lib/python2.7/site-packages/sqlalchemy/orm/attributes.py", line 1125, in emit_backref_from_collection_append_event
_acceptable_key_err(state, initiator, child_impl)
File "/home/keien/dev/wordseer_flask/venv/local/lib/python2.7/site-packages/sqlalchemy/orm/attributes.py", line 1076, in _acceptable_key_err
attribute.impl.parent_token
ValueError: Bidirectional attribute conflict detected: Passing object <Sentence at 0x2fb0490> to attribute "DependencyInSentence.dependency" triggers a modify event on attribute "DependencyInSentence.sentence" via the backref "Sentence.dependency_in_sentence".