How to resolve "sqlalchemy.exc.InvalidRequestError: One or more mappers failed to initialize - can't proceed with initialization of other mappers". I am using superset version 0.38.0 #16561
Unanswered
amkaushik
asked this question in
Q&A / Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Error Message Body
127.0.0.1 - - [30/Aug/2021 07:12:15] "GET /health HTTP/1.1" 500 -
INFO:werkzeug:127.0.0.1 - - [30/Aug/2021 07:12:15] "GET /health HTTP/1.1" 500 -
INFO:root:Configured event logger of type <class 'superset.utils.log.DBEventLogger'>
INFO:superset.utils.logging_configurator:logging was configured successfully
ERROR:superset.app:Failed to create app
Traceback (most recent call last):
File "/app/superset/app.py", line 62, in create_app
app_initializer.init_app()
File "/app/superset/app.py", line 552, in init_app
self.init_app_in_ctx()
File "/app/superset/app.py", line 521, in init_app_in_ctx
self.configure_fab()
File "/app/superset/app.py", line 592, in configure_fab
appbuilder.init_app(self.flask_app, db.session)
File "/usr/local/lib/python3.7/site-packages/flask_appbuilder/base.py", line 202, in init_app
self.sm = self.security_manager_class(self)
File "/app/superset/custom_apis/base/custom_main.py", line 29, in init
super(CustomSecurityManager, self).init(appbuilder)
File "/usr/local/lib/python3.7/site-packages/flask_appbuilder/security/sqla/manager.py", line 55, in init
user_datamodel = SQLAInterface(self.user_model)
File "/usr/local/lib/python3.7/site-packages/flask_appbuilder/models/sqla/interface.py", line 62, in init
for prop in sa.orm.class_mapper(obj).iterate_properties:
File "/usr/local/lib/python3.7/site-packages/sqlalchemy/orm/base.py", line 451, in class_mapper
mapper = inspect_mapped_class(class, configure=configure)
File "/usr/local/lib/python3.7/site-packages/sqlalchemy/orm/base.py", line 430, in _inspect_mapped_class
mapper._configure_all()
File "/usr/local/lib/python3.7/site-packages/sqlalchemy/orm/mapper.py", line 1352, in _configure_all
configure_mappers()
File "/usr/local/lib/python3.7/site-packages/sqlalchemy/orm/mapper.py", line 3295, 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: 'mapped class Alert->alerts'. Original exception was: When initializing mapper mapped class Alert->alerts, expression 'Slice' failed to locate a name ('Slice'). If this is a class name, consider adding this relationship() to the <class 'superset.models.alerts.Alert'> class after both dependent classes have been defined.
Beta Was this translation helpful? Give feedback.
All reactions