You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/11/21 13:33:12 UTC

[GitHub] [superset] mkur-ops opened a new issue, #22180: Error while upgrading superset to 2.0.0 psycopg2.errors.UndefinedColumn

mkur-ops opened a new issue, #22180:
URL: https://github.com/apache/superset/issues/22180

   
   
   After updating superset to 2.0.0 I cannot access sqllab nor view databases (Oracle DB).
   
   I'm running superset on openshift with custom image built from apache/superset:2.0.0 Installed dependencies:
   
   `cx_Oracle certifi flask-oidc==1.4.0 flask_openid gevent psycopg2 psycopg2-binary==2.9.1 redis==3.5.3 itsdangerous==2.0.1`
   I tried running superset db upgrade with following result:
   
   ### Actual results
   
   ```
   $ superset db upgrade
   Loaded your LOCAL configuration at [/app/pythonpath/superset_config.py]
   logging was configured successfully
   2022-11-21 14:21:41,835:INFO:superset.utils.logging_configurator:logging was configured successfully
   2022-11-21 14:21:41,841:INFO:root:Configured event logger of type <class 'superset.utils.log.DBEventLogger'>
   INFO  [alembic.runtime.migration] Context impl PostgresqlImpl.
   INFO  [alembic.runtime.migration] Will assume transactional DDL.
   and superset init throws error:
   
   
   
   Traceback (most recent call last):
   File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1276, in _execute_context
   self.dialect.do_execute(
   File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 608, in do_execute
   cursor.execute(statement, parameters)
   psycopg2.errors.UndefinedColumn: column dbs.allow_multi_schema_metadata_fetch does not exist
   LINE 1: ..., dbs.force_ctas_schema AS dbs_force_ctas_schema, dbs.allow_...
   ^
   
   The above exception was the direct cause of the following exception:
   
   Traceback (most recent call last):
   File "/usr/local/bin/superset", line 33, in \<module\>
   sys.exit(load_entry_point('apache-superset', 'console_scripts', 'superset')())
   File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1128, in __call__
   return self.main(\*args, \*\*kwargs)
   File "/usr/local/lib/python3.8/site-packages/flask/cli.py", line 601, in main
   return super().main(\*args, \*\*kwargs)
   File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1053, in main
   rv = self.invoke(ctx)
   File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1659, in invoke
   return \_process_result(sub_ctx.command.invoke(sub_ctx))
   File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1395, in invoke
   return ctx.invoke(self.callback, \*\*ctx.params)
   File "/usr/local/lib/python3.8/site-packages/click/core.py", line 754, in invoke
   return \__callback(\*args, \*\*kwargs)
   File "/usr/local/lib/python3.8/site-packages/click/decorators.py", line 26, in new_func
   return f(get_current_context(), \*args, \*\*kwargs)
   File "/usr/local/lib/python3.8/site-packages/flask/cli.py", line 445, in decorator
   return \__ctx.invoke(f, \*args, \*\*kwargs)
   File "/usr/local/lib/python3.8/site-packages/click/core.py", line 754, in invoke
   return \__callback(\*args, \*\*kwargs)
   File "/usr/local/lib/python3.8/site-packages/click/decorators.py", line 26, in new_func
   return f(get_current_context(), \*args, \*\*kwargs)
   File "/usr/local/lib/python3.8/site-packages/flask/cli.py", line 445, in decorator
   return \__ctx.invoke(f, \*args, \*\*kwargs)
   File "/usr/local/lib/python3.8/site-packages/click/core.py", line 754, in invoke
   return _callback(\*args, \*\*kwargs)
   File "/app/superset/cli/main.py", line 62, in init
   security_manager.sync_role_definitions()
   File "/app/superset/security/manager.py", line 731, in sync_role_definitions
   self.create_missing_perms()
   File "/app/superset/security/manager.py", line 679, in create_missing_perms
   merge_pv("datasource_access", datasource.get_perm())
   File "/app/superset/connectors/sqla/models.py", line 826, in get_perm
   if self.database is None:
   File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/attributes.py", line 294, in __get__
   return self.impl.get(instance_state(instance), dict_)
   File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/attributes.py", line 730, in get
   value = self.callable(state, passive)
   File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/strategies.py", line 759, in \_load_for_state
   return self.\_emit_lazyload(
   File "\<string\>", line 1, in \<lambda\>
   File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/strategies.py", line 847, in \_emit_lazyload
   q(session)
   File "/usr/local/lib/python3.8/site-packages/sqlalchemy/ext/baked.py", line 615, in \_load_on_pk_identity
   result = list(bq.for_session(self.session).params(\*\*params))
   File "/usr/local/lib/python3.8/site-packages/sqlalchemy/ext/baked.py", line 444, in __iter__
   return q.\_execute_and_instances(context)
   File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/query.py", line 3560, in \_execute_and_instances
   result = conn.execute(querycontext.statement, self.\_params)
   File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1011, in execute
   return meth(self, multiparams, params)
   File "/usr/local/lib/python3.8/site-packages/sqlalchemy/sql/elements.py", line 298, in \_execute_on_connection
   return connection.\_execute_clauseelement(self, multiparams, params)
   File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1124, in \_execute_clauseelement
   ret = self.\_execute_context(
   File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1316, in \_execute_context
   self._handle_dbapi_exception(
   File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1510, in handle_dbapi_exception
   util.raise_(
   File "/usr/local/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 182, in raise
   raise exception
   File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1276, in _execute_context
   self.dialect.do_execute(
   File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 608, in do_execute
   cursor.execute(statement, parameters)
   sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedColumn) column dbs.allow_multi_schema_metadata_fetch does not exist
   LINE 1: ..., dbs.force_ctas_schema AS dbs_force_ctas_schema, dbs.allow_...
   ^
   
   \[SQL: SELECT dbs.uuid AS dbs_uuid, dbs.created_on AS dbs_created_on, dbs.changed_on AS dbs_changed_on, dbs.id AS dbs_id, dbs.verbose_name AS dbs_verbose_name, dbs.database_name AS dbs_database_name, dbs.sqlalchemy_uri AS dbs_sqlalchemy_uri, dbs.password AS dbs_password, dbs.cache_timeout AS dbs_cache_timeout, dbs.select_as_create_table_as AS dbs_select_as_create_table_as, dbs.expose_in_sqllab AS dbs_expose_in_sqllab, dbs.configuration_method AS dbs_configuration_method, dbs.allow_run_async AS dbs_allow_run_async, dbs.allow_file_upload AS dbs_allow_file_upload, dbs.allow_ctas AS dbs_allow_ctas, dbs.allow_cvas AS dbs_allow_cvas, dbs.allow_dml AS dbs_allow_dml, dbs.force_ctas_schema AS dbs_force_ctas_schema, dbs.allow_multi_schema_metadata_fetch AS dbs_allow_multi_schema_metadata_fetch, dbs.extra AS dbs_extra, dbs.encrypted_extra AS dbs_encrypted_extra, dbs.impersonate_user AS dbs_impersonate_user, dbs.server_cert AS dbs_server_cert, dbs.is_managed_externally AS dbs_is_managed_exter
 nally, dbs.external_url AS dbs_external_url, dbs.created_by_fk AS dbs_created_by_fk, dbs.changed_by_fk AS dbs_changed_by_fk
   FROM dbs
   WHERE dbs.id = %(param_1)s\]
   \[parameters: {'param_1': 1}\]
   (Background on this error at: http://sqlalche.me/e/13/f405)
   ```
   
   ### Expected results
   
    successfully migrate to 2.0.0 version
   
   
   
   ### Environment
   
   
   - superset version: `superset version` 2.0.0
   - python version: `python --version`  3.8.13
   


-- 
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: notifications-unsubscribe@superset.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] LavinaVRovine commented on issue #22180: Error while upgrading superset to 2.0.0 psycopg2.errors.UndefinedColumn

Posted by "LavinaVRovine (via GitHub)" <gi...@apache.org>.
LavinaVRovine commented on issue #22180:
URL: https://github.com/apache/superset/issues/22180#issuecomment-1446290894

   > Any update on this?
   
   here is the PR https://github.com/apache/superset/pull/21284/files#diff-633d4f34919db8ab7db651657ebf8a578f437ca1f95d48c4b27c6ccd83c54640
   although i was unable to find the DB migration in superset history....
   I got mad and just went to DB and created that column...


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] mkur-ops commented on issue #22180: Error while upgrading superset to 2.0.0 psycopg2.errors.UndefinedColumn

Posted by "mkur-ops (via GitHub)" <gi...@apache.org>.
mkur-ops commented on issue #22180:
URL: https://github.com/apache/superset/issues/22180#issuecomment-1431027001

   Any update on this?


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Error while upgrading superset to 2.0.0 psycopg2.errors.UndefinedColumn [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #22180:
URL: https://github.com/apache/superset/issues/22180#issuecomment-1958307375

   This version of Superset is no longer supported. If anyone is still encountering this in current versions (3.x) please open a new Issue or a PR to address the problem.  
   


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Error while upgrading superset to 2.0.0 psycopg2.errors.UndefinedColumn [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas closed issue #22180: Error while upgrading superset to 2.0.0 psycopg2.errors.UndefinedColumn
URL: https://github.com/apache/superset/issues/22180


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org