question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SQL Lab query result flashes as Offline

See original GitHub issue

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

How to reproduce the bug

  1. Go to SQL Lab
  2. Shoot off SELECT 1 on your favourite db
  3. See red Offline text flash, later turning into table without results (see screenshot below)

image

  • superset version: master
  • python version: 3.7.3
  • node.js version: 12.1.0
  • npm version: 6.9.0

Checklist

Make sure these boxes are checked before submitting your issue - thank you!

  • I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • I have reproduced the issue with at least the latest released version of superset.
  • I have checked the issue tracker for the same issue and I haven’t found one similar.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
issue-label-bot[bot]commented, Jun 8, 2019

Issue-Label Bot is automatically applying the label #bug to this issue, with a confidence of 0.97. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

1reaction
TempleZhoucommented, Jun 14, 2019

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

SQL Lab query result flashes as Offline · Issue #7677 - GitHub
In master branch SQL Lab is working strangely. It seems /queries/ is getting called with /queries/NaN for some reason, which causes a ...
Read more >
Apache Superset: SQL Lab - YouTube
This is an intro tutorial of Apache Superset SQL Lab. SQL Lab is a is a feature that makes it possible for you...
Read more >
Querying and Analysis - Preset Docs
In the Toolbar, select SQL Lab and, in the drop-down menu, select SQL Editor. Select_SQL_Editor(1). Schema Navigator. Browse to and select ...
Read more >
4 Administering Oracle Database on Exadata
To disable CELL_OFFLOAD_PROCESSING for a SQL command: Copy SELECT /*+ OPT_PARAM('cell_offload_processing' 'false') */ COUNT(*) FROM EMPLOYEES;. To enable ...
Read more >
US10855798B2 - Internet-based proxy service for responding to ...
The proxy server also transmits an offline browsing cookie to the client device ... poses an Internet security threat (e.g., an SQL injection...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found