In master branch SQL Lab is working strangely. It seems /queries/<last_updated_ms> is getting called with /queries/NaN for some reason, which causes a parsing error on https://github.com/apache/incubator-superset/blob/95291facff5c49ce4c63da25ff3efaf4bf101822/superset/views/core.py#L2813 . Putting a simple try-catch for ValueError seemed to do the trick, but it seems like something in the frontend has changed that's causing this error.
Stacktrace:
127.0.0.1 - - [08/Jun/2019 21:41:00] "GET /superset/queries/NaN HTTP/1.1" 500 -
2019-06-08 21:41:00,929:INFO:werkzeug:127.0.0.1 - - [08/Jun/2019 21:41:00] "GET /superset/queries/NaN HTTP/1.1" 500 -
Traceback (most recent call last):
File "/Users/ville/.local/share/virtualenvs/incubator-superset-Q6iPzijF/lib/python3.7/site-packages/flask/app.py", line 2309, in __call__
return self.wsgi_app(environ, start_response)
File "/Users/ville/.local/share/virtualenvs/incubator-superset-Q6iPzijF/lib/python3.7/site-packages/flask/app.py", line 2295, in wsgi_app
response = self.handle_exception(e)
File "/Users/ville/.local/share/virtualenvs/incubator-superset-Q6iPzijF/lib/python3.7/site-packages/flask/app.py", line 1741, in handle_exception
reraise(exc_type, exc_value, tb)
File "/Users/ville/.local/share/virtualenvs/incubator-superset-Q6iPzijF/lib/python3.7/site-packages/flask/_compat.py", line 35, in reraise
raise value
File "/Users/ville/.local/share/virtualenvs/incubator-superset-Q6iPzijF/lib/python3.7/site-packages/flask/app.py", line 2292, in wsgi_app
response = self.full_dispatch_request()
File "/Users/ville/.local/share/virtualenvs/incubator-superset-Q6iPzijF/lib/python3.7/site-packages/flask/app.py", line 1815, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/Users/ville/.local/share/virtualenvs/incubator-superset-Q6iPzijF/lib/python3.7/site-packages/flask/app.py", line 1718, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/Users/ville/.local/share/virtualenvs/incubator-superset-Q6iPzijF/lib/python3.7/site-packages/flask/_compat.py", line 35, in reraise
raise value
File "/Users/ville/.local/share/virtualenvs/incubator-superset-Q6iPzijF/lib/python3.7/site-packages/flask/app.py", line 1813, in full_dispatch_request
rv = self.dispatch_request()
File "/Users/ville/.local/share/virtualenvs/incubator-superset-Q6iPzijF/lib/python3.7/site-packages/flask/app.py", line 1799, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/Users/ville/.local/share/virtualenvs/incubator-superset-Q6iPzijF/lib/python3.7/site-packages/flask_appbuilder/security/decorators.py", line 145, in wraps
return f(self, *args, **kwargs)
File "/Users/ville/dev/incubator-superset/superset/views/core.py", line 2813, in queries
last_updated_ms_int = int(float(last_updated_ms)) if last_updated_ms else 0
ValueError: cannot convert float NaN to integer
SELECT 1 on your favourite dbOffline text flash, later turning into table without results (see screenshot below)
Make sure these boxes are checked before submitting your issue - thank you!
Issue-Label Bot is automatically applying the label #bug to this issue, with a confidence of 0.97. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!
Links: app homepage, dashboard and code for this bot.
I tried to repro this in master, but didn't have any luck. Were you making a sync or an async query here?
The only way I can see us getting into this state on the frontend is if the changed_on field for a query was None. I'm not really sure if that's possible, if I can figure out how to repro this then I'll dig in further
Thanks for the help; fairly sure this was sync. I'll look closer at what's happening next time I have the chance and report back.
@villebro Maybe, you need "can queries on Superset" permission, as the API '/superset/queries/xxx' will be called when the query is running long time.
I cleared by browser cache which seemed to solve the problem.
Most helpful comment
Issue-Label Bot is automatically applying the label
#bugto this issue, with a confidence of 0.97. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!Links: app homepage, dashboard and code for this bot.