Skip to content

Instantly share code, notes, and snippets.

@tmcw
Created May 8, 2013 16:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tmcw/5541688 to your computer and use it in GitHub Desktop.
Save tmcw/5541688 to your computer and use it in GitHub Desktop.
2013-05-08 12:33:43,800 INFO sqlalchemy.engine.base.Engine select version()
2013-05-08 12:33:43,800 INFO sqlalchemy.engine.base.Engine {}
2013-05-08 12:33:43,801 INFO sqlalchemy.engine.base.Engine select current_schema()
2013-05-08 12:33:43,801 INFO sqlalchemy.engine.base.Engine {}
Traceback (most recent call last):
File "maproulette/models.py", line 119, in <module>
Base.metadata.drop_all(engine)
File "/Library/Python/2.7/site-packages/sqlalchemy/schema.py", line 2811, in drop_all
tables=tables)
File "/Library/Python/2.7/site-packages/sqlalchemy/engine/base.py", line 1487, in _run_visitor
conn._run_visitor(visitorcallable, element, **kwargs)
File "/Library/Python/2.7/site-packages/sqlalchemy/engine/base.py", line 1130, in _run_visitor
**kwargs).traverse_single(element)
File "/Library/Python/2.7/site-packages/sqlalchemy/sql/visitors.py", line 111, in traverse_single
return meth(obj, **kw)
File "/Library/Python/2.7/site-packages/sqlalchemy/engine/ddl.py", line 127, in visit_metadata
for t in reversed(sql_util.sort_tables(tables))
File "/Library/Python/2.7/site-packages/sqlalchemy/sql/util.py", line 43, in sort_tables
return list(topological.sort(tuples, tables))
File "/Library/Python/2.7/site-packages/sqlalchemy/util/topological.py", line 46, in sort
for set_ in sort_as_subsets(tuples, allitems):
File "/Library/Python/2.7/site-packages/sqlalchemy/util/topological.py", line 33, in sort_as_subsets
_gen_edges(edges)
sqlalchemy.exc.CircularDependencyError: Circular dependency detected. Cycles: set([Table('tasks', MetaData(bind=None), Column('id', String(length=80), table=<tasks>, primary_key=True, nullable=False), Column('challenge_id', Integer(), ForeignKey('challenges.id'), table=<tasks>, primary_key=True, nullable=False), Column('location', Geometry(geometry_type='POINT'), table=<tasks>), Column('run', String(), table=<tasks>), Column('random', Float(), table=<tasks>, default=ColumnDefault(0.45296512972756964)), Column('manifest', String(), table=<tasks>), Column('current_action', Integer(), ForeignKey('actions.id'), table=<tasks>), schema=None), Table('actions', MetaData(bind=None), Column('id', Integer(), table=<actions>, primary_key=True, nullable=False), Column('timestamp', DateTime(), table=<actions>, default=ColumnDefault(datetime.datetime(2013, 5, 8, 12, 33, 43, 772132))), Column('task_id', String(length=80), ForeignKey('tasks.id'), table=<actions>), Column('challenge_id', Integer(), ForeignKey('tasks.challenge_id'), table=<actions>), Column('user_id', Integer(), ForeignKey('osmusers.id'), table=<actions>), Column('status', String(), table=<actions>), schema=None)]) all edges: set([(Table('challenges', MetaData(bind=None), Column('id', Integer(), table=<challenges>, primary_key=True, nullable=False), Column('slug', String(length=72), table=<challenges>, primary_key=True, nullable=False), Column('title', String(length=128), table=<challenges>), Column('description', String(), table=<challenges>), Column('blurb', String(), table=<challenges>), Column('polygon', Geometry(geometry_type='POLYGON'), table=<challenges>), Column('help', String(), table=<challenges>), Column('instruction', String(), table=<challenges>), Column('run', String(), table=<challenges>), Column('active', Boolean(), table=<challenges>), Column('difficulty', SmallInteger(), table=<challenges>), Column('done_dialog', String(), table=<challenges>), Column('editors', String(), table=<challenges>), schema=None), Table('tasks', MetaData(bind=None), Column('id', String(length=80), table=<tasks>, primary_key=True, nullable=False), Column('challenge_id', Integer(), ForeignKey('challenges.id'), table=<tasks>, primary_key=True, nullable=False), Column('location', Geometry(geometry_type='POINT'), table=<tasks>), Column('run', String(), table=<tasks>), Column('random', Float(), table=<tasks>, default=ColumnDefault(0.45296512972756964)), Column('manifest', String(), table=<tasks>), Column('current_action', Integer(), ForeignKey('actions.id'), table=<tasks>), schema=None)), (Table('osmusers', MetaData(bind=None), Column('id', Integer(), table=<osmusers>, primary_key=True, nullable=False), Column('oauth_token', String(), table=<osmusers>), Column('oauth_secret', String(), table=<osmusers>), Column('display_name', String(), table=<osmusers>), Column('home_location', Geometry(geometry_type='POINT'), table=<osmusers>), schema=None), Table('actions', MetaData(bind=None), Column('id', Integer(), table=<actions>, primary_key=True, nullable=False), Column('timestamp', DateTime(), table=<actions>, default=ColumnDefault(datetime.datetime(2013, 5, 8, 12, 33, 43, 772132))), Column('task_id', String(length=80), ForeignKey('tasks.id'), table=<actions>), Column('challenge_id', Integer(), ForeignKey('tasks.challenge_id'), table=<actions>), Column('user_id', Integer(), ForeignKey('osmusers.id'), table=<actions>), Column('status', String(), table=<actions>), schema=None)), (Table('actions', MetaData(bind=None), Column('id', Integer(), table=<actions>, primary_key=True, nullable=False), Column('timestamp', DateTime(), table=<actions>, default=ColumnDefault(datetime.datetime(2013, 5, 8, 12, 33, 43, 772132))), Column('task_id', String(length=80), ForeignKey('tasks.id'), table=<actions>), Column('challenge_id', Integer(), ForeignKey('tasks.challenge_id'), table=<actions>), Column('user_id', Integer(), ForeignKey('osmusers.id'), table=<actions>), Column('status', String(), table=<actions>), schema=None), Table('tasks', MetaData(bind=None), Column('id', String(length=80), table=<tasks>, primary_key=True, nullable=False), Column('challenge_id', Integer(), ForeignKey('challenges.id'), table=<tasks>, primary_key=True, nullable=False), Column('location', Geometry(geometry_type='POINT'), table=<tasks>), Column('run', String(), table=<tasks>), Column('random', Float(), table=<tasks>, default=ColumnDefault(0.45296512972756964)), Column('manifest', String(), table=<tasks>), Column('current_action', Integer(), ForeignKey('actions.id'), table=<tasks>), schema=None)), (Table('tasks', MetaData(bind=None), Column('id', String(length=80), table=<tasks>, primary_key=True, nullable=False), Column('challenge_id', Integer(), ForeignKey('challenges.id'), table=<tasks>, primary_key=True, nullable=False), Column('location', Geometry(geometry_type='POINT'), table=<tasks>), Column('run', String(), table=<tasks>), Column('random', Float(), table=<tasks>, default=ColumnDefault(0.45296512972756964)), Column('manifest', String(), table=<tasks>), Column('current_action', Integer(), ForeignKey('actions.id'), table=<tasks>), schema=None), Table('actions', MetaData(bind=None), Column('id', Integer(), table=<actions>, primary_key=True, nullable=False), Column('timestamp', DateTime(), table=<actions>, default=ColumnDefault(datetime.datetime(2013, 5, 8, 12, 33, 43, 772132))), Column('task_id', String(length=80), ForeignKey('tasks.id'), table=<actions>), Column('challenge_id', Integer(), ForeignKey('tasks.challenge_id'), table=<actions>), Column('user_id', Integer(), ForeignKey('osmusers.id'), table=<actions>), Column('status', String(), table=<actions>), schema=None))])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment