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/25 15:55:03 UTC
[GitHub] leemengtaiwan opened a new issue #5727: Error when using sqllab
(sql editor) without login
leemengtaiwan opened a new issue #5727: Error when using sqllab (sql editor) without login
URL: https://github.com/apache/incubator-superset/issues/5727
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
----
### Goal
I want to grant log-out users with Public Roles to use SQL Lab > SQL Editor to query databases.
### Superset version
0.26.3
### Expected results
Users can use SQL Editor to make query and get result without login.
### Actual results
Both preview for tables and SQL queries returned the same error showed below.

Raw Text:
```html
<html> <body> <h1>Sorry, something went wrong</h1> <h3>500 - Internal Server Error</h3> <hr> <h2>Stacktrace</h2> <hr> <code> <pre> Traceback (most recent call last): File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1982, in wsgi_app response = self.full_dispatch_request() File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1614, in full_dispatch_request rv = self.handle_user_exception(e) File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1517, in handle_user_exception reraise(exc_type, exc_value, tb) File "/usr/local/lib/python3.5/dist-packages/flask/_compat.py", line 33, in reraise raise value File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1612, in full_dispatch_request rv = self.dispatch_request() File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1598, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "/usr/local/lib/python3.5/dist-packages/flask_appbuilder/security/decorators.py", line 52, in wraps return f(self, *args, **kwargs) File "/usr/local/lib/python3.5/dist-packages/superset/models/core.py", line 903, in wrapper value = f(*args, **kwargs) File "/usr/local/lib/python3.5/dist-packages/superset/views/core.py", line 2403, in sql_json user_id=int(g.user.get_id()), TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType' </pre> </code> </body> </html>
```
Seems that there is not a valid user for executing query, but still don't know how to solve it.( Judged by the error `sql_json user_id=int(g.user.get_id()), TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'`)
### Steps to reproduce
- Setup a Superset using Docker image listed on official README[](https://hub.docker.com/r/amancevice/superset/)
- Create a Admin user
- Login with the user and add ALL permission to `Public` role from `Security` > `List Roles` menu
- Log out and click `SQL Lab` > `SQL Editor` menu
- Make sure `Database`, `Schema`, `Tables` are listed properly
- Make a casual SQL query
- Error
----------------------------------------------------------------
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