rodionxabibov commented on issue #23483:
URL: https://github.com/apache/superset/issues/23483#issuecomment-1695633169

   Superset is connected to mysql db
   Upgrading from 2.0 to 2.0.1 does not cause errors
   
   superset init
   ```
   Loaded your LOCAL configuration at 
[/opt/xxx/superset/config/superset_config.py]
   logging was configured successfully
   2023-08-28 15:28:14,718:INFO:superset.utils.logging_configurator:logging was 
configured successfully
   2023-08-28 15:28:14,726:INFO:root:Configured event logger of type <class 
'superset.utils.log.DBEventLogger'>
   We haven't found any Content Security Policy (CSP) defined in the 
configurations. Please make sure to configure CSP using the TALISMAN_CONFIG key 
or any other external software. Failing to configure CSP have serious security 
implications. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP for 
more information. You can disable this warning using the 
CONTENT_SECURITY_POLICY_WARNING key.
   2023-08-28 15:28:14,727:WARNING:superset.initialization:We haven't found any 
Content Security Policy (CSP) defined in the configurations. Please make sure 
to configure CSP using the TALISMAN_CONFIG key or any other external software. 
Failing to configure CSP have serious security implications. Check 
https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP for more information. You 
can disable this warning using the CONTENT_SECURITY_POLICY_WARNING key.
   Syncing role definition
   2023-08-28 15:28:16,718:INFO:superset.security.manager:Syncing role 
definition
   Syncing Admin perms
   2023-08-28 15:28:16,728:INFO:superset.security.manager:Syncing Admin perms
   Syncing Alpha perms
   2023-08-28 15:28:17,193:INFO:superset.security.manager:Syncing Alpha perms
   Syncing Gamma perms
   2023-08-28 15:28:17,551:INFO:superset.security.manager:Syncing Gamma perms
   Syncing granter perms
   2023-08-28 15:28:17,924:INFO:superset.security.manager:Syncing granter perms
   Syncing sql_lab perms
   2023-08-28 15:28:18,293:INFO:superset.security.manager:Syncing sql_lab perms
   Fetching a set of all perms to lookup which ones are missing
   2023-08-28 15:28:18,655:INFO:superset.security.manager:Fetching a set of all 
perms to lookup which ones are missing
   Creating missing datasource permissions.
   2023-08-28 15:28:19,018:INFO:superset.security.manager:Creating missing 
datasource permissions.
   Creating missing database permissions.
   2023-08-28 15:28:19,029:INFO:superset.security.manager:Creating missing 
database permissions.
   Cleaning faulty perms
   2023-08-28 15:28:19,032:INFO:superset.security.manager:Cleaning faulty perms
   ```
   updating the python environment
   `pip install apache-superset --upgrade`
   
   superset init
   ```
   Loaded your LOCAL configuration at 
[/opt/xxx/superset/config/superset_config.py]
   logging was configured successfully
   2023-08-28 15:34:19,908:INFO:superset.utils.logging_configurator:logging was 
configured successfully
   2023-08-28 15:34:19,915:INFO:root:Configured event logger of type <class 
'superset.utils.log.DBEventLogger'>
   We haven't found any Content Security Policy (CSP) defined in the 
configurations. Please make sure to configure CSP using the TALISMAN_ENABLED 
and TALISMAN_CONFIG keys or any other external software. Failing to configure 
CSP have serious security implications. Check 
https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP for more information. You 
can disable this warning using the CONTENT_SECURITY_POLICY_WARNING key.
   2023-08-28 15:34:19,915:WARNING:superset.initialization:We haven't found any 
Content Security Policy (CSP) defined in the configurations. Please make sure 
to configure CSP using the TALISMAN_ENABLED and TALISMAN_CONFIG keys or any 
other external software. Failing to configure CSP have serious security 
implications. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP for 
more information. You can disable this warning using the 
CONTENT_SECURITY_POLICY_WARNING key.
   
/opt/xxx/superset/lib64/python3.8/site-packages/flask_appbuilder/models/sqla/interface.py:67:
 SAWarning: relationship 'SqlaTable.slices' will copy column tables.id to 
column slices.datasource_id, which conflicts with relationship(s): 
'Slice.table' (copies tables.id to slices.datasource_id). If this is not the 
intention, consider if these relationships should be linked with 
back_populates, or if viewonly=True should be applied to one or more if they 
are read-only. For the less common case that foreign key constraints are 
partially overlapping, the orm.foreign() annotation can be used to isolate the 
columns that should be written towards.   To silence this warning, add the 
parameter 'overlaps="table"' to the 'SqlaTable.slices' relationship. 
(Background on this error at: https://sqlalche.me/e/14/qzyx)
     for prop in class_mapper(obj).iterate_properties:
   INFO  [alembic.runtime.migration] Context impl MySQLImpl.
   INFO  [alembic.runtime.migration] Will assume transactional DDL.
   INFO  [alembic.runtime.migration] Running upgrade e09b4ae78457 -> 
f3afaf1f11f0, add_unique_name_desc_rls
   INFO  [alembic.runtime.migration] Running upgrade f3afaf1f11f0 -> 
7fb8bca906d2, permalink_rename_filterState
   INFO  [alembic.runtime.migration] Running upgrade 7fb8bca906d2 -> 
cdcf3d64daf4, Add user_id and dttm composite index to Log model
   INFO  [alembic.runtime.migration] Running upgrade cdcf3d64daf4 -> 
c747c78868b6, Migrating legacy TreeMap
   INFO  [alembic.runtime.migration] Running upgrade c747c78868b6 -> 
06e1e70058c7, Migrating legacy Area
   INFO  [alembic.runtime.migration] Running upgrade 06e1e70058c7 -> 
a39867932713, query_context_to_mediumtext
   INFO  [alembic.runtime.migration] Running upgrade a39867932713 -> 
409c7b420ab0, add created_by_fk as owner
   INFO  [alembic.runtime.migration] Running upgrade 409c7b420ab0 -> 
ffa79af61a56, rename report_schedule.extra to extra_json
   INFO  [alembic.runtime.migration] Running upgrade ffa79af61a56 -> 
6d3c6f9d665d, fix_table_chart_conditional_formatting_colors
   INFO  [alembic.runtime.migration] Running upgrade 6d3c6f9d665d -> 
291f024254b5, drop_column_allow_multi_schema_metadata_fetch
   INFO  [alembic.runtime.migration] Running upgrade 291f024254b5 -> 
deb4c9d4a4ef, parameters in saved queries
   INFO  [alembic.runtime.migration] Running upgrade deb4c9d4a4ef -> 
4ce1d9b25135, remove_filter_bar_orientation
   INFO  [alembic.runtime.migration] Running upgrade 4ce1d9b25135 -> 
f3c2d8ec8595, create_ssh_tunnel_credentials_tbl
   ```
   superset init
   ```
   Loaded your LOCAL configuration at 
[/opt/xxx/superset/config/superset_config.py]
   logging was configured successfully
   2023-08-28 15:34:56,026:INFO:superset.utils.logging_configurator:logging was 
configured successfully
   2023-08-28 15:34:56,033:INFO:root:Configured event logger of type <class 
'superset.utils.log.DBEventLogger'>
   We haven't found any Content Security Policy (CSP) defined in the 
configurations. Please make sure to configure CSP using the TALISMAN_ENABLED 
and TALISMAN_CONFIG keys or any other external software. Failing to configure 
CSP have serious security implications. Check 
https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP for more information. You 
can disable this warning using the CONTENT_SECURITY_POLICY_WARNING key.
   2023-08-28 15:34:56,033:WARNING:superset.initialization:We haven't found any 
Content Security Policy (CSP) defined in the configurations. Please make sure 
to configure CSP using the TALISMAN_ENABLED and TALISMAN_CONFIG keys or any 
other external software. Failing to configure CSP have serious security 
implications. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP for 
more information. You can disable this warning using the 
CONTENT_SECURITY_POLICY_WARNING key.
   
/opt/xxx/superset/lib64/python3.8/site-packages/flask_appbuilder/models/sqla/interface.py:67:
 SAWarning: relationship 'SqlaTable.slices' will copy column tables.id to 
column slices.datasource_id, which conflicts with relationship(s): 
'Slice.table' (copies tables.id to slices.datasource_id). If this is not the 
intention, consider if these relationships should be linked with 
back_populates, or if viewonly=True should be applied to one or more if they 
are read-only. For the less common case that foreign key constraints are 
partially overlapping, the orm.foreign() annotation can be used to isolate the 
columns that should be written towards.   To silence this warning, add the 
parameter 'overlaps="table"' to the 'SqlaTable.slices' relationship. 
(Background on this error at: https://sqlalche.me/e/14/qzyx)
     for prop in class_mapper(obj).iterate_properties:
   2023-08-28 15:34:57,299:ERROR:flask_appbuilder.security.sqla.manager:Add 
View Menu Error: (sqlalchemy.exc.ProgrammingError) (MySQLdb.ProgrammingError) 
(1146, "Table 'supersetdb.ab_view_menu_id_seq' doesn't exist")
   [SQL: INSERT INTO ab_view_menu (id, name) VALUES (%s, %s)]
   [parameters: [{'name': 'AvailableDomains'}]]
   (Background on this error at: https://sqlalche.me/e/14/f405)
   2023-08-28 15:34:57,304:ERROR:flask_appbuilder.security.sqla.manager:Add 
View Menu Error: (sqlalchemy.exc.ProgrammingError) (MySQLdb.ProgrammingError) 
(1146, "Table 'supersetdb.ab_view_menu_id_seq' doesn't exist")
   [SQL: INSERT INTO ab_view_menu (id, name) VALUES (%s, %s)]
   [parameters: [{'name': 'AvailableDomains'}]]
   (Background on this error at: https://sqlalche.me/e/14/f405)
   2023-08-28 
15:34:57,306:ERROR:flask_appbuilder.security.sqla.manager:Creation of 
Permission View Error: (sqlalchemy.exc.ProgrammingError) 
(MySQLdb.ProgrammingError) (1146, "Table 'supersetdb.ab_view_menu_id_seq' 
doesn't exist")
   [SQL: INSERT INTO ab_view_menu (id, name) VALUES (%s, %s)]
   [parameters: [{'name': 'AvailableDomains'}]]
   (Background on this error at: https://sqlalche.me/e/14/f405)
   2023-08-28 15:34:57,355:ERROR:flask_appbuilder.security.sqla.manager:Add 
Permission: (sqlalchemy.exc.ProgrammingError) (MySQLdb.ProgrammingError) (1146, 
"Table 'supersetdb.ab_permission_id_seq' doesn't exist")
   [SQL: INSERT INTO ab_permission (id, name) VALUES (%s, %s)]
   [parameters: [{'name': 'can_get_or_create_dataset'}]]
   (Background on this error at: https://sqlalche.me/e/14/f405)
   2023-08-28 
15:34:57,357:ERROR:flask_appbuilder.security.sqla.manager:Creation of 
Permission View Error: (sqlalchemy.exc.ProgrammingError) 
(MySQLdb.ProgrammingError) (1146, "Table 'supersetdb.ab_permission_id_seq' 
doesn't exist")
   [SQL: INSERT INTO ab_permission (id, name) VALUES (%s, %s)]
   [parameters: [{'name': 'can_get_or_create_dataset'}]]
   (Background on this error at: https://sqlalche.me/e/14/f405)
   2023-08-28 15:34:57,366:ERROR:flask_appbuilder.security.sqla.manager:Add 
Permission: (sqlalchemy.exc.ProgrammingError) (MySQLdb.ProgrammingError) (1146, 
"Table 'supersetdb.ab_permission_id_seq' doesn't exist")
   [SQL: INSERT INTO ab_permission (id, name) VALUES (%s, %s)]
   [parameters: [{'name': 'can_duplicate'}]]
   (Background on this error at: https://sqlalche.me/e/14/f405)
   2023-08-28 
15:34:57,367:ERROR:flask_appbuilder.security.sqla.manager:Creation of 
Permission View Error: (sqlalchemy.exc.ProgrammingError) 
(MySQLdb.ProgrammingError) (1146, "Table 'supersetdb.ab_permission_id_seq' 
doesn't exist")
   [SQL: INSERT INTO ab_permission (id, name) VALUES (%s, %s)]
   [parameters: [{'name': 'can_duplicate'}]]
   (Background on this error at: https://sqlalche.me/e/14/f405)
   2023-08-28 15:34:57,415:ERROR:flask_appbuilder.security.sqla.manager:Add 
Permission: (sqlalchemy.exc.ProgrammingError) (MySQLdb.ProgrammingError) (1146, 
"Table 'supersetdb.ab_permission_id_seq' doesn't exist")
   [SQL: INSERT INTO ab_permission (id, name) VALUES (%s, %s)]
   [parameters: [{'name': 'can_get_column_values'}]]
   (Background on this error at: https://sqlalche.me/e/14/f405)
   2023-08-28 
15:34:57,417:ERROR:flask_appbuilder.security.sqla.manager:Creation of 
Permission View Error: (sqlalchemy.exc.ProgrammingError) 
(MySQLdb.ProgrammingError) (1146, "Table 'supersetdb.ab_permission_id_seq' 
doesn't exist")
   [SQL: INSERT INTO ab_permission (id, name) VALUES (%s, %s)]
   [parameters: [{'name': 'can_get_column_values'}]]
   (Background on this error at: https://sqlalche.me/e/14/f405)
   2023-08-28 15:34:57,451:ERROR:flask_appbuilder.security.sqla.manager:Add 
View Menu Error: (sqlalchemy.exc.ProgrammingError) (MySQLdb.ProgrammingError) 
(1146, "Table 'supersetdb.ab_view_menu_id_seq' doesn't exist")
   [SQL: INSERT INTO ab_view_menu (id, name) VALUES (%s, %s)]
   [parameters: [{'name': 'Explore'}]]
   (Background on this error at: https://sqlalche.me/e/14/f405)
   2023-08-28 15:34:57,455:ERROR:flask_appbuilder.security.sqla.manager:Add 
View Menu Error: (sqlalchemy.exc.ProgrammingError) (MySQLdb.ProgrammingError) 
(1146, "Table 'supersetdb.ab_view_menu_id_seq' doesn't exist")
   [SQL: INSERT INTO ab_view_menu (id, name) VALUES (%s, %s)]
   [parameters: [{'name': 'Explore'}]]
   (Background on this error at: https://sqlalche.me/e/14/f405)
   2023-08-28 
15:34:57,457:ERROR:flask_appbuilder.security.sqla.manager:Creation of 
Permission View Error: (sqlalchemy.exc.ProgrammingError) 
(MySQLdb.ProgrammingError) (1146, "Table 'supersetdb.ab_view_menu_id_seq' 
doesn't exist")
   [SQL: INSERT INTO ab_view_menu (id, name) VALUES (%s, %s)]
   [parameters: [{'name': 'Explore'}]]
   (Background on this error at: https://sqlalche.me/e/14/f405)
   2023-08-28 15:34:57,497:ERROR:flask_appbuilder.security.sqla.manager:Add 
Permission: (sqlalchemy.exc.ProgrammingError) (MySQLdb.ProgrammingError) (1146, 
"Table 'supersetdb.ab_permission_id_seq' doesn't exist")
   [SQL: INSERT INTO ab_permission (id, name) VALUES (%s, %s)]
   [parameters: [{'name': 'can_get_results'}]]
   (Background on this error at: https://sqlalche.me/e/14/f405)
   2023-08-28 
15:34:57,499:ERROR:flask_appbuilder.security.sqla.manager:Creation of 
Permission View Error: (sqlalchemy.exc.ProgrammingError) 
(MySQLdb.ProgrammingError) (1146, "Table 'supersetdb.ab_permission_id_seq' 
doesn't exist")
   [SQL: INSERT INTO ab_permission (id, name) VALUES (%s, %s)]
   [parameters: [{'name': 'can_get_results'}]]
   (Background on this error at: https://sqlalche.me/e/14/f405)
   2023-08-28 15:34:57,504:ERROR:flask_appbuilder.security.sqla.manager:Add 
Permission: (sqlalchemy.exc.ProgrammingError) (MySQLdb.ProgrammingError) (1146, 
"Table 'supersetdb.ab_permission_id_seq' doesn't exist")
   [SQL: INSERT INTO ab_permission (id, name) VALUES (%s, %s)]
   [parameters: [{'name': 'can_export_csv'}]]
   (Background on this error at: https://sqlalche.me/e/14/f405)
   2023-08-28 
15:34:57,505:ERROR:flask_appbuilder.security.sqla.manager:Creation of 
Permission View Error: (sqlalchemy.exc.ProgrammingError) 
(MySQLdb.ProgrammingError) (1146, "Table 'supersetdb.ab_permission_id_seq' 
doesn't exist")
   [SQL: INSERT INTO ab_permission (id, name) VALUES (%s, %s)]
   [parameters: [{'name': 'can_export_csv'}]]
   (Background on this error at: https://sqlalche.me/e/14/f405)
   2023-08-28 15:34:57,512:ERROR:flask_appbuilder.security.sqla.manager:Add 
Permission: (sqlalchemy.exc.ProgrammingError) (MySQLdb.ProgrammingError) (1146, 
"Table 'supersetdb.ab_permission_id_seq' doesn't exist")
   [SQL: INSERT INTO ab_permission (id, name) VALUES (%s, %s)]
   [parameters: [{'name': 'can_execute_sql_query'}]]
   (Background on this error at: https://sqlalche.me/e/14/f405)
   2023-08-28 
15:34:57,513:ERROR:flask_appbuilder.security.sqla.manager:Creation of 
Permission View Error: (sqlalchemy.exc.ProgrammingError) 
(MySQLdb.ProgrammingError) (1146, "Table 'supersetdb.ab_permission_id_seq' 
doesn't exist")
   [SQL: INSERT INTO ab_permission (id, name) VALUES (%s, %s)]
   [parameters: [{'name': 'can_execute_sql_query'}]]
   (Background on this error at: https://sqlalche.me/e/14/f405)
   2023-08-28 15:34:57,638:ERROR:flask_appbuilder.security.sqla.manager:Add 
Permission: (sqlalchemy.exc.ProgrammingError) (MySQLdb.ProgrammingError) (1146, 
"Table 'supersetdb.ab_permission_id_seq' doesn't exist")
   [SQL: INSERT INTO ab_permission (id, name) VALUES (%s, %s)]
   [parameters: [{'name': 'can_samples'}]]
   (Background on this error at: https://sqlalche.me/e/14/f405)
   2023-08-28 
15:34:57,640:ERROR:flask_appbuilder.security.sqla.manager:Creation of 
Permission View Error: (sqlalchemy.exc.ProgrammingError) 
(MySQLdb.ProgrammingError) (1146, "Table 'supersetdb.ab_permission_id_seq' 
doesn't exist")
   [SQL: INSERT INTO ab_permission (id, name) VALUES (%s, %s)]
   [parameters: [{'name': 'can_samples'}]]
   (Background on this error at: https://sqlalche.me/e/14/f405)
   2023-08-28 15:34:57,669:ERROR:flask_appbuilder.security.sqla.manager:Add 
View Menu Error: (sqlalchemy.exc.ProgrammingError) (MySQLdb.ProgrammingError) 
(1146, "Table 'supersetdb.ab_view_menu_id_seq' doesn't exist")
   [SQL: INSERT INTO ab_view_menu (id, name) VALUES (%s, %s)]
   [parameters: [{'name': 'Explore'}]]
   (Background on this error at: https://sqlalche.me/e/14/f405)
   2023-08-28 15:34:57,672:ERROR:flask_appbuilder.security.sqla.manager:Add 
View Menu Error: (sqlalchemy.exc.ProgrammingError) (MySQLdb.ProgrammingError) 
(1146, "Table 'supersetdb.ab_view_menu_id_seq' doesn't exist")
   [SQL: INSERT INTO ab_view_menu (id, name) VALUES (%s, %s)]
   [parameters: [{'name': 'Explore'}]]
   (Background on this error at: https://sqlalche.me/e/14/f405)
   2023-08-28 
15:34:57,675:ERROR:flask_appbuilder.security.sqla.manager:Creation of 
Permission View Error: (sqlalchemy.exc.ProgrammingError) 
(MySQLdb.ProgrammingError) (1146, "Table 'supersetdb.ab_view_menu_id_seq' 
doesn't exist")
   [SQL: INSERT INTO ab_view_menu (id, name) VALUES (%s, %s)]
   [parameters: [{'name': 'Explore'}]]
   (Background on this error at: https://sqlalche.me/e/14/f405)
   2023-08-28 15:34:57,677:ERROR:flask_appbuilder.security.sqla.manager:Add 
View Menu Error: (sqlalchemy.exc.ProgrammingError) (MySQLdb.ProgrammingError) 
(1146, "Table 'supersetdb.ab_view_menu_id_seq' doesn't exist")
   [SQL: INSERT INTO ab_view_menu (id, name) VALUES (%s, %s)]
   [parameters: [{'name': 'Explore'}]]
   (Background on this error at: https://sqlalche.me/e/14/f405)
   2023-08-28 15:34:57,681:ERROR:flask_appbuilder.security.sqla.manager:Add 
View Menu Error: (sqlalchemy.exc.ProgrammingError) (MySQLdb.ProgrammingError) 
(1146, "Table 'supersetdb.ab_view_menu_id_seq' doesn't exist")
   [SQL: INSERT INTO ab_view_menu (id, name) VALUES (%s, %s)]
   [parameters: [{'name': 'Explore'}]]
   (Background on this error at: https://sqlalche.me/e/14/f405)
   2023-08-28 
15:34:57,683:ERROR:flask_appbuilder.security.sqla.manager:Creation of 
Permission View Error: (sqlalchemy.exc.ProgrammingError) 
(MySQLdb.ProgrammingError) (1146, "Table 'supersetdb.ab_view_menu_id_seq' 
doesn't exist")
   [SQL: INSERT INTO ab_view_menu (id, name) VALUES (%s, %s)]
   [parameters: [{'name': 'Explore'}]]
   (Background on this error at: https://sqlalche.me/e/14/f405)
   2023-08-28 
15:34:57,843:ERROR:flask_appbuilder.security.sqla.manager:Creation of 
Permission View Error: (sqlalchemy.exc.ProgrammingError) 
(MySQLdb.ProgrammingError) (1146, "Table 'supersetdb.ab_permission_view_id_seq' 
doesn't exist")
   [SQL: INSERT INTO ab_permission_view (id, permission_id, view_menu_id) 
VALUES (%s, %s, %s)]
   [parameters: [{'permission_id': 62, 'view_menu_id': 7}]]
   (Background on this error at: https://sqlalche.me/e/14/f405)
   Syncing role definition
   2023-08-28 15:34:57,951:INFO:superset.security.manager:Syncing role 
definition
   Syncing Admin perms
   2023-08-28 15:34:57,961:INFO:superset.security.manager:Syncing Admin perms
   Syncing Alpha perms
   2023-08-28 15:34:58,438:INFO:superset.security.manager:Syncing Alpha perms
   Syncing Gamma perms
   2023-08-28 15:34:58,922:INFO:superset.security.manager:Syncing Gamma perms
   Syncing granter perms
   2023-08-28 15:34:59,395:INFO:superset.security.manager:Syncing granter perms
   Syncing sql_lab perms
   2023-08-28 15:35:00,052:INFO:superset.security.manager:Syncing sql_lab perms
   Traceback (most recent call last):
     File 
"/opt/xxx/superset/lib64/python3.8/site-packages/sqlalchemy/engine/base.py", 
line 1799, in _execute_context
       self.dialect.do_executemany(
     File 
"/opt/xxx/superset/lib64/python3.8/site-packages/sqlalchemy/dialects/mysql/mysqldb.py",
 line 193, in do_executemany
       rowcount = cursor.executemany(statement, parameters)
     File "/opt/xxx/superset/lib64/python3.8/site-packages/MySQLdb/cursors.py", 
line 239, in executemany
       self.rowcount = sum(self.execute(query, arg) for arg in args)
     File "/opt/xxx/superset/lib64/python3.8/site-packages/MySQLdb/cursors.py", 
line 239, in <genexpr>
       self.rowcount = sum(self.execute(query, arg) for arg in args)
     File "/opt/xxx/superset/lib64/python3.8/site-packages/MySQLdb/cursors.py", 
line 206, in execute
       res = self._query(query)
     File "/opt/xxx/superset/lib64/python3.8/site-packages/MySQLdb/cursors.py", 
line 319, in _query
       db.query(q)
     File 
"/opt/xxx/superset/lib64/python3.8/site-packages/MySQLdb/connections.py", line 
254, in query
       _mysql.connection.query(self, query)
   MySQLdb.ProgrammingError: (1146, "Table 
'supersetdb.ab_permission_view_role_id_seq' doesn't exist")
   
   The above exception was the direct cause of the following exception:
   
   Traceback (most recent call last):
     File "/opt/xxx/superset/bin/superset", line 8, in <module>
       sys.exit(superset())
     File "/opt/xxx/superset/lib64/python3.8/site-packages/click/core.py", line 
1128, in __call__
       return self.main(*args, **kwargs)
     File "/opt/xxx/superset/lib64/python3.8/site-packages/flask/cli.py", line 
567, in main
       return super().main(*args, **kwargs)
     File "/opt/xxx/superset/lib64/python3.8/site-packages/click/core.py", line 
1053, in main
       rv = self.invoke(ctx)
     File "/opt/xxx/superset/lib64/python3.8/site-packages/click/core.py", line 
1659, in invoke
       return _process_result(sub_ctx.command.invoke(sub_ctx))
     File "/opt/xxx/superset/lib64/python3.8/site-packages/click/core.py", line 
1395, in invoke
       return ctx.invoke(self.callback, **ctx.params)
     File "/opt/xxx/superset/lib64/python3.8/site-packages/click/core.py", line 
754, in invoke
       return __callback(*args, **kwargs)
     File 
"/opt/xxx/superset/lib64/python3.8/site-packages/click/decorators.py", line 26, 
in new_func
       return f(get_current_context(), *args, **kwargs)
     File "/opt/xxx/superset/lib64/python3.8/site-packages/flask/cli.py", line 
407, in decorator
       return __ctx.invoke(f, *args, **kwargs)
     File "/opt/xxx/superset/lib64/python3.8/site-packages/click/core.py", line 
754, in invoke
       return __callback(*args, **kwargs)
     File 
"/opt/xxx/superset/lib64/python3.8/site-packages/click/decorators.py", line 26, 
in new_func
       return f(get_current_context(), *args, **kwargs)
     File "/opt/xxx/superset/lib64/python3.8/site-packages/flask/cli.py", line 
407, in decorator
       return __ctx.invoke(f, *args, **kwargs)
     File "/opt/xxx/superset/lib64/python3.8/site-packages/click/core.py", line 
754, in invoke
       return __callback(*args, **kwargs)
     File 
"/opt/xxx/superset/lib64/python3.8/site-packages/superset/cli/main.py", line 
62, in init
       security_manager.sync_role_definitions()
     File 
"/opt/xxx/superset/lib64/python3.8/site-packages/superset/security/manager.py", 
line 792, in sync_role_definitions
       self.set_role("sql_lab", self._is_sql_lab_pvm)
     File 
"/opt/xxx/superset/lib64/python3.8/site-packages/superset/security/manager.py", 
line 885, in set_role
       self.get_session.merge(role)
     File "<string>", line 2, in merge
     File 
"/opt/xxx/superset/lib64/python3.8/site-packages/sqlalchemy/orm/session.py", 
line 2971, in merge
       self._autoflush()
     File 
"/opt/xxx/superset/lib64/python3.8/site-packages/sqlalchemy/orm/session.py", 
line 2241, in _autoflush
       util.raise_(e, with_traceback=sys.exc_info()[2])
     File 
"/opt/xxx/superset/lib64/python3.8/site-packages/sqlalchemy/util/compat.py", 
line 207, in raise_
       raise exception
     File 
"/opt/xxx/superset/lib64/python3.8/site-packages/sqlalchemy/orm/session.py", 
line 2230, in _autoflush
       self.flush()
     File 
"/opt/xxx/superset/lib64/python3.8/site-packages/sqlalchemy/orm/session.py", 
line 3367, in flush
       self._flush(objects)
     File 
"/opt/xxx/superset/lib64/python3.8/site-packages/sqlalchemy/orm/session.py", 
line 3507, in _flush
       transaction.rollback(_capture_exception=True)
     File 
"/opt/xxx/superset/lib64/python3.8/site-packages/sqlalchemy/util/langhelpers.py",
 line 70, in __exit__
       compat.raise_(
     File 
"/opt/xxx/superset/lib64/python3.8/site-packages/sqlalchemy/util/compat.py", 
line 207, in raise_
       raise exception
     File 
"/opt/xxx/superset/lib64/python3.8/site-packages/sqlalchemy/orm/session.py", 
line 3467, in _flush
       flush_context.execute()
     File 
"/opt/xxx/superset/lib64/python3.8/site-packages/sqlalchemy/orm/unitofwork.py", 
line 456, in execute
       rec.execute(self)
     File 
"/opt/xxx/superset/lib64/python3.8/site-packages/sqlalchemy/orm/unitofwork.py", 
line 579, in execute
       self.dependency_processor.process_saves(uow, states)
     File 
"/opt/xxx/superset/lib64/python3.8/site-packages/sqlalchemy/orm/dependency.py", 
line 1182, in process_saves
       self._run_crud(
     File 
"/opt/xxx/superset/lib64/python3.8/site-packages/sqlalchemy/orm/dependency.py", 
line 1245, in _run_crud
       connection.execute(statement, secondary_insert)
     File 
"/opt/xxx/superset/lib64/python3.8/site-packages/sqlalchemy/engine/base.py", 
line 1306, in execute
       return meth(self, multiparams, params, _EMPTY_EXECUTION_OPTS)
     File 
"/opt/xxx/superset/lib64/python3.8/site-packages/sqlalchemy/sql/elements.py", 
line 325, in _execute_on_connection
       return connection._execute_clauseelement(
     File 
"/opt/xxx/superset/lib64/python3.8/site-packages/sqlalchemy/engine/base.py", 
line 1498, in _execute_clauseelement
       ret = self._execute_context(
     File 
"/opt/xxx/superset/lib64/python3.8/site-packages/sqlalchemy/engine/base.py", 
line 1862, in _execute_context
       self._handle_dbapi_exception(
     File 
"/opt/xxx/superset/lib64/python3.8/site-packages/sqlalchemy/engine/base.py", 
line 2043, in _handle_dbapi_exception
       util.raise_(
     File 
"/opt/xxx/superset/lib64/python3.8/site-packages/sqlalchemy/util/compat.py", 
line 207, in raise_
       raise exception
     File 
"/opt/xxx/superset/lib64/python3.8/site-packages/sqlalchemy/engine/base.py", 
line 1799, in _execute_context
       self.dialect.do_executemany(
     File 
"/opt/xxx/superset/lib64/python3.8/site-packages/sqlalchemy/dialects/mysql/mysqldb.py",
 line 193, in do_executemany
       rowcount = cursor.executemany(statement, parameters)
     File "/opt/xxx/superset/lib64/python3.8/site-packages/MySQLdb/cursors.py", 
line 239, in executemany
       self.rowcount = sum(self.execute(query, arg) for arg in args)
     File "/opt/xxx/superset/lib64/python3.8/site-packages/MySQLdb/cursors.py", 
line 239, in <genexpr>
       self.rowcount = sum(self.execute(query, arg) for arg in args)
     File "/opt/xxx/superset/lib64/python3.8/site-packages/MySQLdb/cursors.py", 
line 206, in execute
       res = self._query(query)
     File "/opt/xxx/superset/lib64/python3.8/site-packages/MySQLdb/cursors.py", 
line 319, in _query
       db.query(q)
     File 
"/opt/xxx/superset/lib64/python3.8/site-packages/MySQLdb/connections.py", line 
254, in query
       _mysql.connection.query(self, query)
   sqlalchemy.exc.ProgrammingError: (raised as a result of Query-invoked 
autoflush; consider using a session.no_autoflush block if this flush is 
occurring prematurely)
   (MySQLdb.ProgrammingError) (1146, "Table 
'supersetdb.ab_permission_view_role_id_seq' doesn't exist")
   [SQL: INSERT INTO ab_permission_view_role (id, permission_view_id, role_id) 
VALUES (nextval(ab_permission_view_role_id_seq), %s, %s)]
   [parameters: ((19, 6), (2, 6), (165, 6), (164, 6), (79, 6), (109, 6), (128, 
6), (132, 6)  ... displaying 10 of 14 total bound parameter sets ...  (167, 6), 
(169, 6))]
   (Background on this error at: https://sqlalche.me/e/14/f405)
   
   ```
   I connect to the mysql database, the ab_permission_view_id_seq table does 
not exist


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to