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 2020/12/07 10:57:52 UTC
[GitHub] [incubator-superset] magic-overflow opened a new issue #11949: qlite3.OperationalError: no such column: alerts.sql
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] dpgaspar commented on issue #11949: qlite3.OperationalError: no such column: alerts.sql
Posted by GitBox <gi...@apache.org>.
dpgaspar commented on issue #11949:
URL: https://github.com/apache/incubator-superset/issues/11949#issuecomment-739843254
That seems like a db migration issue, did your `superset db upgrade` executed without issues?
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] dpgaspar commented on issue #11949: qlite3.OperationalError: no such column: alerts.sql
Posted by GitBox <gi...@apache.org>.
dpgaspar commented on issue #11949:
URL: https://github.com/apache/incubator-superset/issues/11949#issuecomment-739862711
Do you have any important data on your local (assuming that) sqlite db? If not just delete it from `${HOME}/.superset/superset.db` and repeat the install process
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] dpgaspar commented on issue #11949: qlite3.OperationalError: no such column: alerts.sql
Posted by GitBox <gi...@apache.org>.
dpgaspar commented on issue #11949:
URL: https://github.com/apache/incubator-superset/issues/11949#issuecomment-739881292
If you have data there, you need to troubleshoot your current db,
- first what version (or SHA) of superset you running?
- Are you overriding you db connection on `superset_config.py` or `config.py`?
- second run `superset db upgrade` and post the entire log
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] magic-overflow commented on issue #11949: qlite3.OperationalError: no such column: alerts.sql
Posted by GitBox <gi...@apache.org>.
magic-overflow commented on issue #11949:
URL: https://github.com/apache/incubator-superset/issues/11949#issuecomment-739848707
log:
```
ubuntu:~$ superset init
logging was configured successfully
INFO:superset.utils.logging_configurator:logging was configured successfully
/home/ubuntu/venv/lib/python3.8/site-packages/flask_caching/__init__.py:191: UserWarning: Flask-Caching: CACHE_TYPE is set to null, caching is effectively disabled.
warnings.warn(
Syncing role definition
INFO:superset.security.manager:Syncing role definition
Syncing Admin perms
INFO:superset.security.manager:Syncing Admin perms
Syncing Alpha perms
INFO:superset.security.manager:Syncing Alpha perms
Syncing Gamma perms
INFO:superset.security.manager:Syncing Gamma perms
Syncing granter perms
INFO:superset.security.manager:Syncing granter perms
Syncing sql_lab perms
INFO:superset.security.manager:Syncing sql_lab perms
Fetching a set of all perms to lookup which ones are missing
INFO:superset.security.manager:Fetching a set of all perms to lookup which ones are missing
Creating missing datasource permissions.
INFO:superset.security.manager:Creating missing datasource permissions.
Creating missing database permissions.
INFO:superset.security.manager:Creating missing database permissions.
Traceback (most recent call last):
File "/home/ubuntu/venv/lib/python3.8/site-packages/sqlalchemy_utils/types/encrypted/encrypted_type.py", line 126, in decrypt
decrypted = decrypted.decode('utf-8')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x9e in position 2: invalid start byte
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/ubuntu/venv/bin/superset", line 8, in <module>
sys.exit(superset())
File "/home/ubuntu/venv/lib/python3.8/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/home/ubuntu/venv/lib/python3.8/site-packages/flask/cli.py", line 586, in main
return super(FlaskGroup, self).main(*args, **kwargs)
File "/home/ubuntu/venv/lib/python3.8/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/ubuntu/venv/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/ubuntu/venv/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/ubuntu/venv/lib/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/home/ubuntu/venv/lib/python3.8/site-packages/click/decorators.py", line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/ubuntu/venv/lib/python3.8/site-packages/flask/cli.py", line 426, in decorator
return __ctx.invoke(f, *args, **kwargs)
File "/home/ubuntu/venv/lib/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/home/ubuntu/venv/lib/python3.8/site-packages/click/decorators.py", line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/ubuntu/venv/lib/python3.8/site-packages/flask/cli.py", line 426, in decorator
return __ctx.invoke(f, *args, **kwargs)
File "/home/ubuntu/venv/lib/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/home/ubuntu/venv/lib/python3.8/site-packages/superset/cli.py", line 75, in init
security_manager.sync_role_definitions()
File "/home/ubuntu/venv/lib/python3.8/site-packages/superset/security/manager.py", line 632, in sync_role_definitions
self.create_missing_perms()
File "/home/ubuntu/venv/lib/python3.8/site-packages/superset/security/manager.py", line 575, in create_missing_perms
databases = self.get_session.query(models.Database).all()
File "/home/ubuntu/venv/lib/python3.8/site-packages/sqlalchemy/orm/query.py", line 3373, in all
return list(self)
File "/home/ubuntu/venv/lib/python3.8/site-packages/sqlalchemy/orm/loading.py", line 100, in instances
cursor.close()
File "/home/ubuntu/venv/lib/python3.8/site-packages/sqlalchemy/util/langhelpers.py", line 68, in __exit__
compat.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/orm/loading.py", line 80, in instances
rows = [proc(row) for row in fetch]
File "/home/ubuntu/venv/lib/python3.8/site-packages/sqlalchemy/orm/loading.py", line 80, in <listcomp>
rows = [proc(row) for row in fetch]
File "/home/ubuntu/venv/lib/python3.8/site-packages/sqlalchemy/orm/loading.py", line 579, in _instance
_populate_full(
File "/home/ubuntu/venv/lib/python3.8/site-packages/sqlalchemy/orm/loading.py", line 725, in _populate_full
dict_[key] = getter(row)
File "/home/ubuntu/venv/lib/python3.8/site-packages/sqlalchemy/sql/type_api.py", line 1278, in process
return process_value(impl_processor(value), dialect)
File "/home/ubuntu/venv/lib/python3.8/site-packages/sqlalchemy_utils/types/encrypted/encrypted_type.py", line 469, in process_result_value
value = super().process_result_value(value=value, dialect=dialect)
File "/home/ubuntu/venv/lib/python3.8/site-packages/sqlalchemy_utils/types/encrypted/encrypted_type.py", line 414, in process_result_value
decrypted_value = self.engine.decrypt(value)
File "/home/ubuntu/venv/lib/python3.8/site-packages/sqlalchemy_utils/types/encrypted/encrypted_type.py", line 128, in decrypt
raise ValueError('Invalid decryption key')
ValueError: Invalid decryption key
```
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] dpgaspar edited a comment on issue #11949: qlite3.OperationalError: no such column: alerts.sql
Posted by GitBox <gi...@apache.org>.
dpgaspar edited a comment on issue #11949:
URL: https://github.com/apache/incubator-superset/issues/11949#issuecomment-739881292
If you have data there, you need to troubleshoot your current db, some questions:
- What version (or SHA) of superset you running?
- Are you overriding you db connection on `superset_config.py` or `config.py`?
- Did you upgrade superset?
- second run `superset db upgrade` and post the entire log
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] magic-overflow commented on issue #11949: qlite3.OperationalError: no such column: alerts.sql
Posted by GitBox <gi...@apache.org>.
magic-overflow commented on issue #11949:
URL: https://github.com/apache/incubator-superset/issues/11949#issuecomment-739868311
Will my saved queries and chart be deleted as well?
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] magic-overflow commented on issue #11949: qlite3.OperationalError: no such column: alerts.sql
Posted by GitBox <gi...@apache.org>.
magic-overflow commented on issue #11949:
URL: https://github.com/apache/incubator-superset/issues/11949#issuecomment-742153478
* Running version 0.38.0
* superset_config.py
* I upgraded superset by following command
* pip install apache-superset --upgrade
* superset db upgrade
* superset init
Log:
> (venv) ubuntu@ip-5:~$ superset db upgrade
> logging was configured successfully
> INFO:superset.utils.logging_configurator:logging was configured successfully
> /home/ubuntu/venv/lib/python3.8/site-packages/flask_caching/__init__.py:191: UserWarning: Flask-Caching: CACHE_TYPE is set > to null, caching is effectively disabled.
> warnings.warn(
> WARNI [alembic.env] SQLite Database support for metadata databases will be removed in a future version of Superset.
> INFO [alembic.runtime.migration] Context impl SQLiteImpl.
> INFO [alembic.runtime.migration] Will assume transactional DDL.
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] dpgaspar commented on issue #11949: qlite3.OperationalError: no such column: alerts.sql
Posted by GitBox <gi...@apache.org>.
dpgaspar commented on issue #11949:
URL: https://github.com/apache/incubator-superset/issues/11949#issuecomment-739860618
Has your `SECRET_KEY` changed? also `no such column: alerts.sql` is a migration issue for sure, if the upgrade procedure had no errors make sure your upgrading the same database has your flask process. I see your using `sqlite3` is this correct?
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] magic-overflow commented on issue #11949: qlite3.OperationalError: no such column: alerts.sql
Posted by GitBox <gi...@apache.org>.
magic-overflow commented on issue #11949:
URL: https://github.com/apache/incubator-superset/issues/11949#issuecomment-739844614
> That seems like a db migration issue, did your `superset db upgrade` executed without issues?
yes without issue. Error when superset init.
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org