You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "EMCP (via GitHub)" <gi...@apache.org> on 2023/04/09 17:30:48 UTC

[GitHub] [superset] EMCP opened a new issue, #23631: Scratch 2.1.0 installation - no such table: logs

EMCP opened a new issue, #23631:
URL: https://github.com/apache/superset/issues/23631

   I've hit the upgrade changes going from `v2.0.1` to `v2.1.0` .. so far It seems I must now use a `SECURE_KEY` within my `superset_config.py` .. that was fixed I think .. but now on a fresh install I goto hit the website and can see in the logs of gunicorn
   
   #### How to reproduce the bug
   
   1. run the from scratch installation on Ubuntu 22.04 LTS
   2. Set the `superset_config.py` to have the `SECRET_KEY` and nothing else
   3. Navigate to `<ip_address>:8088` , you will see a 500 error
   4. See error
   
   ```
   Class 'werkzeug.local.LocalProxy' is not mapped                                                                                                                            
   DBEventLogger failed to log event(s)                                                                                                                                       
   _log() got an unexpected keyword argument 'exc_info'                                                                                                                       
   Traceback (most recent call last):                                                                                                                                         
     File "/home/ubuntu/.local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1819, in _execute_context                                                         
       self.dialect.do_execute(                                                                                                                                               
     File "/home/ubuntu/.local/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 732, in do_execute                                                             
       cursor.execute(statement, parameters)                                                                                                                                  
   sqlite3.OperationalError: no such table: logs 
   ```
   
   ### Expected results
   
   I should be able to login
   
   ### Actual results
   
   Error 500 page is shown
   
   #### Screenshots
   
   ```
   Class 'werkzeug.local.LocalProxy' is not mapped                                                                                                                   [94/1865]
   DBEventLogger failed to log event(s)
   _log() got an unexpected keyword argument 'exc_info'
   Traceback (most recent call last):
     File "/home/ubuntu/.local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1819, in _execute_context
       self.dialect.do_execute(
     File "/home/ubuntu/.local/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 732, in do_execute
       cursor.execute(statement, parameters)
   sqlite3.OperationalError: no such table: logs
   
   The above exception was the direct cause of the following exception:
   
   Traceback (most recent call last):
     File "/home/ubuntu/.local/lib/python3.8/site-packages/superset/utils/log.py", line 368, in log
       sesh.bulk_save_objects(logs)
     File "<string>", line 2, in bulk_save_objects
     File "/home/ubuntu/.local/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 3627, in bulk_save_objects
       self._bulk_save_mappings(
     File "/home/ubuntu/.local/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 3843, in _bulk_save_mappings
       transaction.rollback(_capture_exception=True)
     File "/home/ubuntu/.local/lib/python3.8/site-packages/sqlalchemy/util/langhelpers.py", line 70, in __exit__
       compat.raise_(
     File "/home/ubuntu/.local/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 207, in raise_
       raise exception
     File "/home/ubuntu/.local/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 3831, in _bulk_save_mappings
       persistence._bulk_insert(
     File "/home/ubuntu/.local/lib/python3.8/site-packages/sqlalchemy/orm/persistence.py", line 107, in _bulk_insert
       _emit_insert_statements(
     File "/home/ubuntu/.local/lib/python3.8/site-packages/sqlalchemy/orm/persistence.py", line 1097, in _emit_insert_statements
       c = connection._execute_20(
     File "/home/ubuntu/.local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1631, in _execute_20
       return meth(self, args_10style, kwargs_10style, execution_options)
     File "/home/ubuntu/.local/lib/python3.8/site-packages/sqlalchemy/sql/elements.py", line 325, in _execute_on_connection
       return connection._execute_clauseelement(
     File "/home/ubuntu/.local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1498, in _execute_clauseelement
       ret = self._execute_context(
     File "/home/ubuntu/.local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1862, in _execute_context
       self._handle_dbapi_exception(
     File "/home/ubuntu/.local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 2043, in _handle_dbapi_exception
       util.raise_(
     File "/home/ubuntu/.local/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 207, in raise_
       raise exception
     File "/home/ubuntu/.local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1819, in _execute_context
       self.dialect.do_execute(
     File "/home/ubuntu/.local/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 732, in do_execute
       cursor.execute(statement, parameters)
   sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such table: logs
   [SQL: INSERT INTO logs (action, slice_id, json, dttm, duration_ms, referrer) VALUES (?, ?, ?, ?, ?, ?)]
   [parameters: ('welcome', 0, '{"path": "/superset/welcome/", "object_ref": "Superset.welcome"}', '2023-04-09 17:23:11.503984', 0, 'http://10.10.200.177:8088/superset/welcom
   e/')]
   (Background on this error at: https://sqlalche.me/e/14/e3q8)
   
   During handling of the above exception, another exception occurred:
   
   ```
   
   ### Environment
   
   (please complete the following information):
   
   - browser type and version: Firefox 
   - superset version: `2.1.0`
   - python version: `3.8`
   - node.js version: `node -v`
   - any feature flags active:
   


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org.apache.org

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] [superset] EMCP closed issue #23631: Scratch 2.1.0 installation - no such table: logs

Posted by "EMCP (via GitHub)" <gi...@apache.org>.
EMCP closed issue #23631: Scratch 2.1.0 installation - no such table: logs
URL: https://github.com/apache/superset/issues/23631


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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] [superset] EMCP commented on issue #23631: Scratch 2.1.0 installation - no such table: logs

Posted by "EMCP (via GitHub)" <gi...@apache.org>.
EMCP commented on issue #23631:
URL: https://github.com/apache/superset/issues/23631#issuecomment-1501177235

   I can see now what my issue was... it isn't just gunicorn that needs the `superset_config.py` `SECRET_KEY` but also the `/home/ubuntu/.local/bin/superset db upgrade` command
   
   Is there a "HOW TO UPGRADE" part of the release notes that can highlight these actions needed?  I am totally okay with adding these things just.. would help to follow an explicit warning


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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] [superset] EMCP commented on issue #23631: Scratch 2.1.0 installation - no such table: logs

Posted by "EMCP (via GitHub)" <gi...@apache.org>.
EMCP commented on issue #23631:
URL: https://github.com/apache/superset/issues/23631#issuecomment-1501178298

   I successfully fixed my installation issues by prepending the python path likeso
   
   ```
   FLASK_APP=superset PYTHONPATH=/home/ubuntu/.superset:$PYTHONPATH /home/ubuntu/.local/bin/superset db upgrade
   ```


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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