-
Notifications
You must be signed in to change notification settings - Fork 13.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flask g.user is None #14589
Comments
Hi @krsnik93, do you run |
@zhaoyongjie yes + |
is this still happening? @krsnik93 |
In the same vein (I believe), I've tried to replicate on a Fedora32 VM running Superset 1.1.0 and get: $ /opt/superset/venv/bin/superset version
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Superset 1.1.0
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
$ /opt/superset/venv/bin/superset --version
Python 3.8.7
Flask 1.1.2
Werkzeug 1.0.1
[fedora@temperature ~]$ /opt/superset/venv/bin/superset export-dashboards
logging was configured successfully
INFO:superset.utils.logging_configurator:logging was configured successfully
/opt/superset/venv/lib64/python3.8/site-packages/flask_caching/__init__.py:201: UserWarning: Flask-Caching: CACHE_TYPE is set to null, caching is effectively disabled.
warnings.warn(
Starting export
INFO:superset.utils.dashboard_import_export:Starting export
Traceback (most recent call last):
File "/opt/superset/venv/lib64/python3.8/site-packages/sqlalchemy/engine/base.py", line 1276, in _execute_context
self.dialect.do_execute(
File "/opt/superset/venv/lib64/python3.8/site-packages/sqlalchemy/engine/default.py", line 608, in do_execute
cursor.execute(statement, parameters)
sqlite3.OperationalError: no such table: dashboards
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/superset/venv/bin/superset", line 33, in <module>
sys.exit(load_entry_point('apache-superset==1.1.0', 'console_scripts', 'superset')())
File "/opt/superset/venv/lib64/python3.8/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/opt/superset/venv/lib64/python3.8/site-packages/flask/cli.py", line 586, in main
return super(FlaskGroup, self).main(*args, **kwargs)
File "/opt/superset/venv/lib64/python3.8/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/opt/superset/venv/lib64/python3.8/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/opt/superset/venv/lib64/python3.8/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/opt/superset/venv/lib64/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/opt/superset/venv/lib64/python3.8/site-packages/click/decorators.py", line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File "/opt/superset/venv/lib64/python3.8/site-packages/flask/cli.py", line 426, in decorator
return __ctx.invoke(f, *args, **kwargs)
File "/opt/superset/venv/lib64/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/opt/superset/venv/lib64/python3.8/site-packages/click/decorators.py", line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File "/opt/superset/venv/lib64/python3.8/site-packages/flask/cli.py", line 426, in decorator
return __ctx.invoke(f, *args, **kwargs)
File "/opt/superset/venv/lib64/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/opt/superset/venv/lib64/python3.8/site-packages/superset/cli.py", line 392, in export_dashboards
data = dashboard_import_export.export_dashboards(db.session)
File "/opt/superset/venv/lib64/python3.8/site-packages/superset/utils/dashboard_import_export.py", line 31, in export_dashboards
for dashboard in dashboards:
File "/opt/superset/venv/lib64/python3.8/site-packages/sqlalchemy/orm/query.py", line 3535, in __iter__
return self._execute_and_instances(context)
File "/opt/superset/venv/lib64/python3.8/site-packages/sqlalchemy/orm/query.py", line 3560, in _execute_and_instances
result = conn.execute(querycontext.statement, self._params)
File "/opt/superset/venv/lib64/python3.8/site-packages/sqlalchemy/engine/base.py", line 1011, in execute
return meth(self, multiparams, params)
File "/opt/superset/venv/lib64/python3.8/site-packages/sqlalchemy/sql/elements.py", line 298, in _execute_on_connection
return connection._execute_clauseelement(self, multiparams, params)
File "/opt/superset/venv/lib64/python3.8/site-packages/sqlalchemy/engine/base.py", line 1124, in _execute_clauseelement
ret = self._execute_context(
File "/opt/superset/venv/lib64/python3.8/site-packages/sqlalchemy/engine/base.py", line 1316, in _execute_context
self._handle_dbapi_exception(
File "/opt/superset/venv/lib64/python3.8/site-packages/sqlalchemy/engine/base.py", line 1510, in _handle_dbapi_exception
util.raise_(
File "/opt/superset/venv/lib64/python3.8/site-packages/sqlalchemy/util/compat.py", line 182, in raise_
raise exception
File "/opt/superset/venv/lib64/python3.8/site-packages/sqlalchemy/engine/base.py", line 1276, in _execute_context
self.dialect.do_execute(
File "/opt/superset/venv/lib64/python3.8/site-packages/sqlalchemy/engine/default.py", line 608, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such table: dashboards
[SQL: SELECT dashboards.uuid AS dashboards_uuid, dashboards.created_on AS dashboards_created_on, dashboards.changed_on AS dashboards_changed_on, dashboards.id AS dashboards_id, dashboards.dashboard_title AS dashboards_dashboard_title, dashboards.position_json AS dashboards_position_json, dashboards.description AS dashboards_description, dashboards.css AS dashboards_css, dashboards.json_metadata AS dashboards_json_metadata, dashboards.slug AS dashboards_slug, dashboards.published AS dashboards_published, dashboards.created_by_fk AS dashboards_created_by_fk, dashboards.changed_by_fk AS dashboards_changed_by_fk
FROM dashboards]
(Background on this error at: http://sqlalche.me/e/13/e3q8) Here, Superset seems to look for dashboards in a SQLite db… yet I've been using PostgreSQL as back-end database (and have defined dashboards in my instance that's running otherwise smoothly):
|
Closing as I am now able to do |
This happens if you run |
superset export-datasources gives me this error on 2.0.1 |
I had this problem on 2.1.0 but was able to solve it by running |
I had same problem on 3.1.2 and finally discovered that issue happens when there are no user with login "admin", because of CLI exporting using this user superset/superset/cli/importexport.py Line 79 in 6ba1dfb
so to fix this issue you just need to create user with "admin" login and access enough to export |
I ran
superset export-dashboards
on a fresh install of latest master. I see the same error forsuperset export-datasources
.Expected results
Expect command to export resources.
Actual results
How to reproduce the bug
superset export-dashboards
Environment
(please complete the following information):
Checklist
Make sure to follow these steps before submitting your issue - thank you!
The text was updated successfully, but these errors were encountered: