crchemist / cit

Civic Issue Tracker
GNU General Public License v3.0
1 stars 6 forks source link

`init_db.py --init-data` fails #142

Closed crchemist closed 9 years ago

crchemist commented 9 years ago
(env)➜  cit git:(master) python init_db.py --init-data
Traceback (most recent call last):
  File "init_db.py", line 79, in <module>
    generate_test_data()
  File "init_db.py", line 60, in generate_test_data
    db.session.add(comment)
  File "/home/crchemist/projects/cit/env/local/lib/python2.7/site-packages/sqlalchemy/orm/scoping.py", line 150, in do
    return getattr(self.registry(), name)(*args, **kwargs)
  File "/home/crchemist/projects/cit/env/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 1577, in add
    self._save_or_update_state(state)
  File "/home/crchemist/projects/cit/env/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 1595, in _save_or_update_state
    halt_on=self._contains_state):
  File "/home/crchemist/projects/cit/env/local/lib/python2.7/site-packages/sqlalchemy/orm/mapper.py", line 2552, in cascade_iterator
    visited_states, halt_on))
  File "/home/crchemist/projects/cit/env/local/lib/python2.7/site-packages/sqlalchemy/orm/relationships.py", line 1516, in cascade_iterator
    get_all_pending(state, dict_)
  File "/home/crchemist/projects/cit/env/local/lib/python2.7/site-packages/sqlalchemy/orm/attributes.py", line 764, in get_all_pending
    ret = [(instance_state(current), current)]
AttributeError: 'str' object has no attribute '_sa_instance_state'
(env)➜  cit git:(master)