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 2021/06/01 13:27:52 UTC

[GitHub] [superset] EBoisseauSierra commented on issue #14589: Flask g.user is None

EBoisseauSierra commented on issue #14589:
URL: https://github.com/apache/superset/issues/14589#issuecomment-852123979


   In the same vein (I believe), I've tried to replicate on a Fedora32 VM running Superset 1.1.0 and get:
   
   ```shell
   $ /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):
   
   ```
   $ cat /opt/superset/superset_config.py | grep -C 0 SQLALCHEMY_DATABASE_URI
   SQLALCHEMY_DATABASE_URI = 'postgresql://superset:<password>@localhost/superset_backend'
   ```


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