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 2018/08/17 09:50:31 UTC

[GitHub] FlavienMakesInfographics opened a new issue #5659: SQL Lab queries fails to be rendered with `AttributeError: 'NoneType' object has no attribute 'database_name'`

FlavienMakesInfographics opened a new issue #5659: SQL Lab queries fails to be rendered with `AttributeError: 'NoneType' object has no attribute 'database_name'`
URL: https://github.com/apache/incubator-superset/issues/5659
 
 
   Make sure these boxes are checked before submitting your issue - thank you!
   
   - [x] I have checked the superset logs for python stacktraces and included it here as text if any
   - [x] I have reproduced the issue with at least the latest released version of superset
   - [x] I have checked the issue tracker for the same issue and I haven't found one similar
   
   
   ### Superset version
   
   0.26.3
   
   ### Expected results
   
   Successful query.
   
   ### Actual results
   
   Sending the data fails.
   
   ### Steps to reproduce
   
   I just upgraded from version 0.20.4 to 0.26.3. I ran `superset db upgrade` and `superset db init` as stated in the [documentation](https://superset.incubator.apache.org/installation.html). The second command fails through
   `2018-08-17 09:40:05,133:ERROR:flask_migrate:Error: Directory /home/data/miniconda3/envs/superset/lib/python3.6/site-packages/superset/migrations already exists`
   
   When running the app, charts and dashboards work. But SQL Lab queries fail to be rendered with the following stacktrace:
   ```
   Exception on /superset/queries/-5000 [GET]
   Traceback (most recent call last):
     File "/home/data/miniconda3/envs/superset/lib/python3.6/site-packages/flask/app.py", line 1982, in wsgi_app
       response = self.full_dispatch_request()
     File "/home/data/miniconda3/envs/superset/lib/python3.6/site-packages/flask/app.py", line 1614, in full_dispatch_request
       rv = self.handle_user_exception(e)
     File "/home/data/miniconda3/envs/superset/lib/python3.6/site-packages/flask/app.py", line 1517, in handle_user_exception
       reraise(exc_type, exc_value, tb)
     File "/home/data/miniconda3/envs/superset/lib/python3.6/site-packages/flask/_compat.py", line 33, in reraise
       raise value
     File "/home/data/miniconda3/envs/superset/lib/python3.6/site-packages/flask/app.py", line 1612, in full_dispatch_request
       rv = self.dispatch_request()
     File "/home/data/miniconda3/envs/superset/lib/python3.6/site-packages/flask/app.py", line 1598, in dispatch_request
       return self.view_functions[rule.endpoint](**req.view_args)
     File "/home/data/miniconda3/envs/superset/lib/python3.6/site-packages/superset/views/core.py", line 2561, in queries
       dict_queries = {q.client_id: q.to_dict() for q in sql_queries}
     File "/home/data/miniconda3/envs/superset/lib/python3.6/site-packages/superset/views/core.py", line 2561, in <dictcomp>
       dict_queries = {q.client_id: q.to_dict() for q in sql_queries}
     File "/home/data/miniconda3/envs/superset/lib/python3.6/site-packages/superset/models/sql_lab.py", line 95, in to_dict
       'db': self.database.database_name,
   AttributeError: 'NoneType' object has no attribute 'database_name'
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org