magic-overflow opened a new issue #11949:
URL: https://github.com/apache/incubator-superset/issues/11949


   After upgrade Superset
   ```
   Sorry, something went wrong
   500 - Internal Server Error
   Stacktrace
           Traceback (most recent call last):
     File 
"/home/ubuntu/venv/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 
1276, in _execute_context
       self.dialect.do_execute(
     File 
"/home/ubuntu/venv/lib/python3.8/site-packages/sqlalchemy/engine/default.py", 
line 593, in do_execute
       cursor.execute(statement, parameters)
   sqlite3.OperationalError: no such column: alerts.sql
   
   The above exception was the direct cause of the following exception:
   
   Traceback (most recent call last):
     File "/home/ubuntu/venv/lib/python3.8/site-packages/flask/app.py", line 
2447, in wsgi_app
       response = self.full_dispatch_request()
     File "/home/ubuntu/venv/lib/python3.8/site-packages/flask/app.py", line 
1952, in full_dispatch_request
       rv = self.handle_user_exception(e)
     File "/home/ubuntu/venv/lib/python3.8/site-packages/flask/app.py", line 
1821, in handle_user_exception
       reraise(exc_type, exc_value, tb)
     File "/home/ubuntu/venv/lib/python3.8/site-packages/flask/_compat.py", 
line 39, in reraise
       raise value
     File "/home/ubuntu/venv/lib/python3.8/site-packages/flask/app.py", line 
1950, in full_dispatch_request
       rv = self.dispatch_request()
     File "/home/ubuntu/venv/lib/python3.8/site-packages/flask/app.py", line 
1936, in dispatch_request
       return self.view_functions[rule.endpoint](**req.view_args)
     File 
"/home/ubuntu/venv/lib/python3.8/site-packages/flask_appbuilder/security/decorators.py",
 line 109, in wraps
       return f(self, *args, **kwargs)
     File 
"/home/ubuntu/venv/lib/python3.8/site-packages/flask_appbuilder/views.py", line 
552, in list
       return self.render_template(
     File 
"/home/ubuntu/venv/lib/python3.8/site-packages/flask_appbuilder/baseviews.py", 
line 280, in render_template
       return render_template(
     File "/home/ubuntu/venv/lib/python3.8/site-packages/flask/templating.py", 
line 137, in render_template
       return _render(
     File "/home/ubuntu/venv/lib/python3.8/site-packages/flask/templating.py", 
line 120, in _render
       rv = template.render(context)
     File 
"/home/ubuntu/venv/lib/python3.8/site-packages/jinja2/environment.py", line 
1090, in render
       self.environment.handle_exception()
     File 
"/home/ubuntu/venv/lib/python3.8/site-packages/jinja2/environment.py", line 
832, in handle_exception
       reraise(*rewrite_traceback_stack(source=source))
     File "/home/ubuntu/venv/lib/python3.8/site-packages/jinja2/_compat.py", 
line 28, in reraise
       raise value.with_traceback(tb)
     File 
"/home/ubuntu/venv/lib/python3.8/site-packages/superset/templates/appbuilder/general/model/list.html",
 line 20, in top-level template code
       {% import 'appbuilder/general/lib.html' as lib %}
     File 
"/home/ubuntu/venv/lib/python3.8/site-packages/flask_appbuilder/templates/appbuilder/base.html",
 line 1, in top-level template code
       {% extends base_template %}
     File 
"/home/ubuntu/venv/lib/python3.8/site-packages/superset/templates/superset/base.html",
 line 20, in top-level template code
       {% from 'superset/partials/asset_bundle.html' import css_bundle, 
js_bundle with context %}
     File 
"/home/ubuntu/venv/lib/python3.8/site-packages/superset/templates/appbuilder/baselayout.html",
 line 20, in top-level template code
       {% import 'appbuilder/baselib.html' as baselib %}
     File 
"/home/ubuntu/venv/lib/python3.8/site-packages/flask_appbuilder/templates/appbuilder/init.html",
 line 46, in top-level template code
       {% block body %}
     File 
"/home/ubuntu/venv/lib/python3.8/site-packages/superset/templates/appbuilder/baselayout.html",
 line 39, in block "body"
       </div>
     File 
"/home/ubuntu/venv/lib/python3.8/site-packages/superset/templates/appbuilder/general/model/list.html",
 line 26, in block "content"
       {% block list_search scoped %}
     File 
"/home/ubuntu/venv/lib/python3.8/site-packages/superset/templates/appbuilder/general/model/list.html",
 line 27, in block "list_search"
       {{ widgets.get('search')()|safe }}
     File 
"/home/ubuntu/venv/lib/python3.8/site-packages/flask_appbuilder/widgets.py", 
line 115, in __call__
       form_fields[col] = self.template_args["form"][col]()
     File 
"/home/ubuntu/venv/lib/python3.8/site-packages/wtforms/fields/core.py", line 
160, in __call__
       return self.meta.render_field(self, kwargs)
     File "/home/ubuntu/venv/lib/python3.8/site-packages/wtforms/meta.py", line 
56, in render_field
       return field.widget(field, **render_kw)
     File 
"/home/ubuntu/venv/lib/python3.8/site-packages/flask_appbuilder/fieldwidgets.py",
 line 176, in __call__
       return super(Select2ManyWidget, self).__call__(field, **kwargs)
     File 
"/home/ubuntu/venv/lib/python3.8/site-packages/wtforms/widgets/core.py", line 
300, in __call__
       for val, label, selected in field.iter_choices():
     File 
"/home/ubuntu/venv/lib/python3.8/site-packages/flask_appbuilder/fields.py", 
line 208, in iter_choices
       for pk, obj in self._get_object_list():
     File 
"/home/ubuntu/venv/lib/python3.8/site-packages/flask_appbuilder/fields.py", 
line 128, in _get_object_list
       objs = self.query_func()
     File 
"/home/ubuntu/venv/lib/python3.8/site-packages/flask_appbuilder/forms.py", line 
139, in <lambda>
       return lambda: self.datamodel.get_related_interface(col_name).query()[1]
     File 
"/home/ubuntu/venv/lib/python3.8/site-packages/flask_appbuilder/models/sqla/interface.py",
 line 365, in query
       count = self.query_count(query, filters, select_columns)
     File 
"/home/ubuntu/venv/lib/python3.8/site-packages/flask_appbuilder/models/sqla/interface.py",
 line 288, in query_count
       return self._apply_inner_all(
     File 
"/home/ubuntu/venv/lib/python3.8/site-packages/sqlalchemy/orm/query.py", line 
3803, in count
       return self.from_self(col).scalar()
     File 
"/home/ubuntu/venv/lib/python3.8/site-packages/sqlalchemy/orm/query.py", line 
3523, in scalar
       ret = self.one()
     File 
"/home/ubuntu/venv/lib/python3.8/site-packages/sqlalchemy/orm/query.py", line 
3490, in one
       ret = self.one_or_none()
     File 
"/home/ubuntu/venv/lib/python3.8/site-packages/sqlalchemy/orm/query.py", line 
3459, in one_or_none
       ret = list(self)
     File 
"/home/ubuntu/venv/lib/python3.8/site-packages/sqlalchemy/orm/query.py", line 
3535, in __iter__
       return self._execute_and_instances(context)
     File 
"/home/ubuntu/venv/lib/python3.8/site-packages/sqlalchemy/orm/query.py", line 
3560, in _execute_and_instances
       result = conn.execute(querycontext.statement, self._params)
     File 
"/home/ubuntu/venv/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 
1011, in execute
       return meth(self, multiparams, params)
     File 
"/home/ubuntu/venv/lib/python3.8/site-packages/sqlalchemy/sql/elements.py", 
line 298, in _execute_on_connection
       return connection._execute_clauseelement(self, multiparams, params)
     File 
"/home/ubuntu/venv/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 
1124, in _execute_clauseelement
       ret = self._execute_context(
     File 
"/home/ubuntu/venv/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 
1316, in _execute_context
       self._handle_dbapi_exception(
     File 
"/home/ubuntu/venv/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 
1510, in _handle_dbapi_exception
       util.raise_(
     File 
"/home/ubuntu/venv/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 
182, in raise_
       raise exception
     File 
"/home/ubuntu/venv/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 
1276, in _execute_context
       self.dialect.do_execute(
     File 
"/home/ubuntu/venv/lib/python3.8/site-packages/sqlalchemy/engine/default.py", 
line 593, in do_execute
       cursor.execute(statement, parameters)
   sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such column: 
alerts.sql
   [SQL: SELECT count(*) AS count_1 
   FROM (SELECT alerts.id AS alerts_id, alerts.label AS alerts_label, 
alerts.active AS alerts_active, alerts.crontab AS alerts_crontab, alerts.sql AS 
alerts_sql, alerts.alert_type AS alerts_alert_type, alerts.recipients AS 
alerts_recipients, alerts.log_retention AS alerts_log_retention, 
alerts.grace_period AS alerts_grace_period, alerts.slice_id AS alerts_slice_id, 
alerts.dashboard_id AS alerts_dashboard_id, alerts.database_id AS 
alerts_database_id, alerts.last_eval_dttm AS alerts_last_eval_dttm, 
alerts.last_state AS alerts_last_state 
   FROM alerts) AS anon_1]
   (Background on this error at: http://sqlalche.me/e/13/e3q8)
   ```
   
   ### Expected results
   
   what you expected to happen.
   
   ### Actual results
   
   what actually happens.
   
   #### Screenshots
   
   If applicable, add screenshots to help explain your problem.
   
   #### How to reproduce the bug
   
   1. Go to '...'
   2. Click on '....'
   3. Scroll down to '....'
   4. See error
   
   ### Environment
   
   (please complete the following information):
   
   - superset version: `superset version`
   - python version: `python --version`
   - node.js version: `node -v`
   
   ### Checklist
   
   Make sure to follow these steps before submitting your issue - thank you!
   
   - [ ] I have checked the superset logs for python stacktraces and included 
it here as text if there are any.
   - [ ] I have reproduced the issue with at least the latest released version 
of superset.
   - [ ] I have checked the issue tracker for the same issue and I haven't 
found one similar.
   
   ### Additional context
   
   Add any other context about the problem here.
   


----------------------------------------------------------------
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.

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