SEBA-Smart-Services / medusa-sbo

Cloud-based Smart Services orchestration
http://medusa-docs.sebbqld.com
0 stars 1 forks source link

flicket integration commit has broken app #8

Open clivegross opened 7 years ago

clivegross commented 7 years ago

Traceback (most recent call last): File "scheduler.py", line 1, in from app.scheduling import scheduler File "./app/init.py", line 59, in from app import models, add, admin, cmms, weather, algorithms, reports, scheduling File "./app/admin/init.py", line 1, in from . import controllers File "./app/admin/controllers.py", line 126, in admin.add_view(SiteView(Site, db.session)) File "/var/www/medusa/env/lib/python3.5/site-packages/flask_admin/contrib/sqla/view.py", line 318, in init menu_icon_value=menu_icon_value) File "/var/www/medusa/env/lib/python3.5/site-packages/flask_admin/model/base.py", line 771, in init self._refresh_cache() File "/var/www/medusa/env/lib/python3.5/site-packages/flask_admin/model/base.py", line 847, in _refresh_cache self._list_columns = self.get_list_columns() File "/var/www/medusa/env/lib/python3.5/site-packages/flask_admin/model/base.py", line 979, in get_list_columns only_columns=self.column_list or self.scaffold_list_columns(), File "/var/www/medusa/env/lib/python3.5/site-packages/flask_admin/contrib/sqla/view.py", line 404, in scaffold_list_columns for p in self._get_model_iterator(): File "/var/www/medusa/env/lib/python3.5/site-packages/flask_admin/contrib/sqla/view.py", line 340, in _get_model_iterator return model._sa_class_manager.mapper.iterate_properties File "/var/www/medusa/env/lib/python3.5/site-packages/sqlalchemy/orm/mapper.py", line 1874, in iterate_properties configure_mappers() File "/var/www/medusa/env/lib/python3.5/site-packages/sqlalchemy/orm/mapper.py", line 2863, in configure_mappers raise e sqlalchemy.exc.InvalidRequestError: One or more mappers failed to initialize - can't proceed with initialization of other mappers. Triggering mapper: 'Mapper|User|user'. Original exception was: When initializing mapper Mapper|User|user, expression 'User.id == FlicketTicket.started_id' failed to locate a name ("name 'FlicketTicket' is not defined"). If this is a class name, consider adding this relationship() to the <class 'app.models.users.User'> class after both dependent classes have been defined.

clivegross commented 7 years ago

spawned uWSGI mule 1 (pid: 15027) Traceback (most recent call last): File "scheduler.py", line 1, in from app.scheduling import scheduler File "./app/init.py", line 61, in from app import models, admin, cmms, weather, algorithms, reports, scheduling File "./app/admin/init.py", line 1, in from . import controllers File "./app/admin/controllers.py", line 135, in admin.add_view(SiteView(Site, db.session)) File "/var/www/medusa/env/lib/python3.5/site-packages/flask_admin/contrib/sqla/view.py", line 318, in init menu_icon_value=menu_icon_value) File "/var/www/medusa/env/lib/python3.5/site-packages/flask_admin/model/base.py", line 771, in init self._refresh_cache() File "/var/www/medusa/env/lib/python3.5/site-packages/flask_admin/model/base.py", line 847, in _refresh_cache self._list_columns = self.get_list_columns() File "/var/www/medusa/env/lib/python3.5/site-packages/flask_admin/model/base.py", line 979, in get_list_columns only_columns=self.column_list or self.scaffold_list_columns(), File "/var/www/medusa/env/lib/python3.5/site-packages/flask_admin/contrib/sqla/view.py", line 404, in scaffold_list_columns for p in self._get_model_iterator(): File "/var/www/medusa/env/lib/python3.5/site-packages/flask_admin/contrib/sqla/view.py", line 340, in _get_model_iterator return model._sa_class_manager.mapper.iterate_properties File "/var/www/medusa/env/lib/python3.5/site-packages/sqlalchemy/orm/mapper.py", line 1874, in iterate_properties configure_mappers() File "/var/www/medusa/env/lib/python3.5/site-packages/sqlalchemy/orm/mapper.py", line 2866, in configure_mappers mapper._post_configure_properties() File "/var/www/medusa/env/lib/python3.5/site-packages/sqlalchemy/orm/mapper.py", line 1765, in _post_configure_properties prop.init() File "/var/www/medusa/env/lib/python3.5/site-packages/sqlalchemy/orm/interfaces.py", line 184, in init self.do_init() File "/var/www/medusa/env/lib/python3.5/site-packages/sqlalchemy/orm/relationships.py", line 1653, in do_init self._setup_join_conditions() File "/var/www/medusa/env/lib/python3.5/site-packages/sqlalchemy/orm/relationships.py", line 1728, in _setup_join_conditions can_be_synced_fn=self._columns_are_mapped File "/var/www/medusa/env/lib/python3.5/site-packages/sqlalchemy/orm/relationships.py", line 1986, in init self._determine_joins() File "/var/www/medusa/env/lib/python3.5/site-packages/sqlalchemy/orm/relationships.py", line 2069, in _determine_joins consider_as_foreign_keys=consider_as_foreign_keys File "", line 2, in join_condition File "/var/www/medusa/env/lib/python3.5/site-packages/sqlalchemy/sql/selectable.py", line 964, in _join_condition a, a_subset, b, consider_as_foreign_keys) File "/var/www/medusa/env/lib/python3.5/site-packages/sqlalchemy/sql/selectable.py", line 1019, in _joincond_scan_left_right col = fk.get_referent(b) File "/var/www/medusa/env/lib/python3.5/site-packages/sqlalchemy/sql/schema.py", line 1718, in get_referent return table.corresponding_column(self.column) File "/var/www/medusa/env/lib/python3.5/site-packages/sqlalchemy/util/langhelpers.py", line 764, in get obj.dict[self.name] = result = self.fget(obj) File "/var/www/medusa/env/lib/python3.5/site-packages/sqlalchemy/sql/schema.py", line 1858, in column tablekey) sqlalchemy.exc.NoReferencedTableError: Foreign key associated with column 'flicket_topic.started_id' could not find table 'user' with which to generate a foreign key to target column 'id'