question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Upgrade to 0.37.1 has bug: column dbs.allow_cvas does not exist

See original GitHub issue

Hi
I just upgraded superset from 0.36.0 to 0.37.1 per instructions in docs. Now when I try to open any dashboard or slice, I get a 500 error.

Expected results

The dashboards to open.

Actual results

A 500 error, with this stacktrace:

Sorry, something went wrong
500 - Internal Server Error
Stacktrace
        Traceback (most recent call last):
  File "/home/superset/.env/superset/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1278, in _execute_context
    cursor, statement, parameters, context
  File "/home/superset/.env/superset/lib/python3.6/site-packages/sqlalchemy/engine/default.py", line 593, in do_execute
    cursor.execute(statement, parameters)
psycopg2.errors.UndefinedColumn: column dbs.allow_cvas does not exist
LINE 1: ...low_csv_upload, dbs.allow_ctas AS dbs_allow_ctas, dbs.allow_...
                                                             ^
HINT:  Perhaps you meant to reference the column "dbs.allow_ctas".


The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/superset/.env/superset/lib/python3.6/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/superset/.env/superset/lib/python3.6/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/superset/.env/superset/lib/python3.6/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/superset/.env/superset/lib/python3.6/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/home/superset/.env/superset/lib/python3.6/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/superset/.env/superset/lib/python3.6/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/superset/.env/superset/lib/python3.6/site-packages/flask_appbuilder/security/decorators.py", line 109, in wraps
    return f(self, *args, **kwargs)
  File "/home/superset/.env/superset/lib/python3.6/site-packages/superset/views/core.py", line 1616, in dashboard
    for datasource, slices in datasources.items()
  File "/home/superset/.env/superset/lib/python3.6/site-packages/superset/views/core.py", line 1616, in <dictcomp>
    for datasource, slices in datasources.items()
  File "/home/superset/.env/superset/lib/python3.6/site-packages/superset/connectors/base/models.py", line 276, in data_for_slices
    data = self.data
  File "/home/superset/.env/superset/lib/python3.6/site-packages/superset/connectors/sqla/models.py", line 602, in data
    data_ = super().data
  File "/home/superset/.env/superset/lib/python3.6/site-packages/superset/connectors/base/models.py", line 244, in data
    "database": self.database.data,  # pylint: disable=no-member
  File "/home/superset/.env/superset/lib/python3.6/site-packages/sqlalchemy/orm/attributes.py", line 287, in __get__
    return self.impl.get(instance_state(instance), dict_)
  File "/home/superset/.env/superset/lib/python3.6/site-packages/sqlalchemy/orm/attributes.py", line 723, in get
    value = self.callable_(state, passive)
  File "/home/superset/.env/superset/lib/python3.6/site-packages/sqlalchemy/orm/strategies.py", line 760, in _load_for_state
    session, state, primary_key_identity, passive
  File "<string>", line 1, in <lambda>
  File "/home/superset/.env/superset/lib/python3.6/site-packages/sqlalchemy/orm/strategies.py", line 850, in _emit_lazyload
    session.query(self.mapper), primary_key_identity
  File "/home/superset/.env/superset/lib/python3.6/site-packages/sqlalchemy/ext/baked.py", line 616, in _load_on_pk_identity
    result = list(bq.for_session(self.session).params(**params))
  File "/home/superset/.env/superset/lib/python3.6/site-packages/sqlalchemy/ext/baked.py", line 445, in __iter__
    return q._execute_and_instances(context)
  File "/home/superset/.env/superset/lib/python3.6/site-packages/sqlalchemy/orm/query.py", line 3528, in _execute_and_instances
    result = conn.execute(querycontext.statement, self._params)
  File "/home/superset/.env/superset/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1014, in execute
    return meth(self, multiparams, params)
  File "/home/superset/.env/superset/lib/python3.6/site-packages/sqlalchemy/sql/elements.py", line 298, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/home/superset/.env/superset/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1133, in _execute_clauseelement
    distilled_params,
  File "/home/superset/.env/superset/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1318, in _execute_context
    e, statement, parameters, cursor, context
  File "/home/superset/.env/superset/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1512, in _handle_dbapi_exception
    sqlalchemy_exception, with_traceback=exc_info[2], from_=e
  File "/home/superset/.env/superset/lib/python3.6/site-packages/sqlalchemy/util/compat.py", line 178, in raise_
    raise exception
  File "/home/superset/.env/superset/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1278, in _execute_context
    cursor, statement, parameters, context
  File "/home/superset/.env/superset/lib/python3.6/site-packages/sqlalchemy/engine/default.py", line 593, in do_execute
    cursor.execute(statement, parameters)
sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedColumn) column dbs.allow_cvas does not exist
LINE 1: ...low_csv_upload, dbs.allow_ctas AS dbs_allow_ctas, dbs.allow_...
                                                             ^
HINT:  Perhaps you meant to reference the column "dbs.allow_ctas".

[SQL: SELECT 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.allow_run_async AS dbs_allow_run_async, dbs.allow_csv_upload AS dbs_allow_csv_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.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': 2}]
(Background on this error at: http://sqlalche.me/e/13/f405)

How to reproduce the bug

  1. Install version 0.36.0
  2. Setup some charts and dashboards
  3. Upgrade to version 0.37.0 using commands written in docs:
pip install apache-superset --upgrade
superset db upgrade
superset init
  1. Go to any dashboard/slice.

Environment

(please complete the following information):

  • superset version: Superset 0.37.1
  • python version: Python 3.6.11

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:15 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
issue-label-bot[bot]commented, Sep 26, 2020

Issue-Label Bot is automatically applying the label #bug to this issue, with a confidence of 0.97. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

1reaction
etr2460commented, Sep 3, 2021

Since this problem doesn’t happen in the most recent released versions of superset, and this is a bug from a 0.x version, i’m going to close it out

Read more comments on GitHub >

github_iconTop Results From Across the Web

Upgrade to 0.37.1 has bug: column dbs.allow_cvas does not ...
Hi I just upgraded superset from 0.36.0 to 0.37.1 per instructions in docs. Now when I try to open any dashboard or slice,...
Read more >
BuildNumber error mismatch after a successful upgrade - Jira
As best practice, Atlassian recommends performing testing upgrades in a Staging Environment before upgrading the Production instance.
Read more >
Database Upgrade Error Column ... - OutSystems
Column 'OSUSR_TUD_CONTRACT1.CONTRACTFILENAME' exists in database as Binary Data (varbinary) but the new version is defined as Text (NVARCHAR(50)) ...
Read more >
Postgres Syntax requiring extra ' ' and "" around things
Is there some setting on Postgres causing this to happen? Postgres 9.4.5 (On RDS). select 'NAME' from "DBS"; ?column ...
Read more >
IDM 14.4 in-place upgrade Column name 'SCHED_NAME ...
After performing an in-place upgrade from IDM version 14.2 to 14.4 IDM on the first startup is failing to update the MS SQL...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found