Skip to content

Instantly share code, notes, and snippets.

@jacobsvante
Created February 11, 2014 11:02
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 jacobsvante/8932939 to your computer and use it in GitHub Desktop.
Save jacobsvante/8932939 to your computer and use it in GitHub Desktop.
$ sandmanctl postgresql+psycopg2://proj:proj@localhost/proj_v2
/Users/jacob/.venvs/proj-web-py2/lib/python2.7/site-packages/sqlalchemy/dialects/postgresql/base.py:1802: SAWarning: Did not recognize type 'geography' of column 'point'
name, format_type, default, notnull, domains, enums, schema)
/Users/jacob/.venvs/proj-web-py2/lib/python2.7/site-packages/sqlalchemy/dialects/postgresql/base.py:1802: SAWarning: Did not recognize type 'geometry' of column 'location'
name, format_type, default, notnull, domains, enums, schema)
Traceback (most recent call last):
File "/Users/jacob/.venvs/proj-web-py2/bin/sandmanctl", line 9, in <module>
load_entry_point('sandman==0.7.6', 'console_scripts', 'sandmanctl')()
File "/Users/jacob/.venvs/proj-web-py2/lib/python2.7/site-packages/sandman/sandmanctl.py", line 63, in main
activate(name='sandmanctl')
File "/Users/jacob/.venvs/proj-web-py2/lib/python2.7/site-packages/sandman/model/utils.py", line 155, in activate
register_classes_for_admin(db.session, show_pks, name)
File "/Users/jacob/.venvs/proj-web-py2/lib/python2.7/site-packages/sandman/model/utils.py", line 129, in register_classes_for_admin
admin_view.add_view(admin_view_class(cls, db_session))
File "/Users/jacob/.venvs/proj-web-py2/lib/python2.7/site-packages/flask_admin/contrib/sqla/view.py", line 271, in __init__
super(ModelView, self).__init__(model, name, category, endpoint, url)
File "/Users/jacob/.venvs/proj-web-py2/lib/python2.7/site-packages/flask_admin/model/base.py", line 495, in __init__
self._refresh_cache()
File "/Users/jacob/.venvs/proj-web-py2/lib/python2.7/site-packages/flask_admin/model/base.py", line 503, in _refresh_cache
self._list_columns = self.get_list_columns()
File "/Users/jacob/.venvs/proj-web-py2/lib/python2.7/site-packages/flask_admin/model/base.py", line 614, in get_list_columns
columns = self.scaffold_list_columns()
File "/Users/jacob/.venvs/proj-web-py2/lib/python2.7/site-packages/flask_admin/contrib/sqla/view.py", line 322, in scaffold_list_columns
for p in self._get_model_iterator():
File "/Users/jacob/.venvs/proj-web-py2/lib/python2.7/site-packages/flask_admin/contrib/sqla/view.py", line 293, in _get_model_iterator
return model._sa_class_manager.mapper.iterate_properties
File "/Users/jacob/.venvs/proj-web-py2/lib/python2.7/site-packages/sqlalchemy/orm/mapper.py", line 1762, in iterate_properties
configure_mappers()
File "/Users/jacob/.venvs/proj-web-py2/lib/python2.7/site-packages/sqlalchemy/orm/mapper.py", line 2539, in configure_mappers
mapper._post_configure_properties()
File "/Users/jacob/.venvs/proj-web-py2/lib/python2.7/site-packages/sqlalchemy/orm/mapper.py", line 1653, in _post_configure_properties
prop.init()
File "/Users/jacob/.venvs/proj-web-py2/lib/python2.7/site-packages/sqlalchemy/orm/interfaces.py", line 143, in init
self.do_init()
File "/Users/jacob/.venvs/proj-web-py2/lib/python2.7/site-packages/sqlalchemy/orm/relationships.py", line 1382, in do_init
self._setup_join_conditions()
File "/Users/jacob/.venvs/proj-web-py2/lib/python2.7/site-packages/sqlalchemy/orm/relationships.py", line 1458, in _setup_join_conditions
can_be_synced_fn=self._columns_are_mapped
File "/Users/jacob/.venvs/proj-web-py2/lib/python2.7/site-packages/sqlalchemy/orm/relationships.py", line 1721, in __init__
self._determine_joins()
File "/Users/jacob/.venvs/proj-web-py2/lib/python2.7/site-packages/sqlalchemy/orm/relationships.py", line 1848, in _determine_joins
% self.prop)
sqlalchemy.exc.AmbiguousForeignKeysError: Could not determine join condition between parent/child tables on relationship module_submodule.module - there are multiple foreign key paths linking the tables. Specify the 'foreign_keys' argument, providing a list of those columns which should be counted as containing a foreign key reference to the parent table.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment