superset icon indicating copy to clipboard operation
superset copied to clipboard

Sample "Misc Charts / multiformat Calendar Heatmap" is broken

Open jeffcarey opened this issue 9 years ago • 2 comments

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.17.4 OS: Ubuntu 16.10

Expected results

A calendar heatmap is displayed when browsing to the "Misc Charts" dashboard

Actual results

Error message "Couldn't parse datetime string: u'2016/01/0122:18:37.000000'" is displayed

Steps to reproduce

superset runserver Go to localhost:8088 in browser Click "Misc Charts"

I believe the issue is that Sqlite does not recognize the date format being used. The message above is from using the default, string3. string1 and string2 also report similar errors.

Stacktrace:
2017-04-08 13:10:23,177:INFO:root:SELECT string3 AS __timestamp, COUNT(*) AS count 
FROM multiformat_time_series 
WHERE string3 >= '2016-04-08 13:10:23.000000' AND string3 <= '2017-04-08 13:10:23.000000' GROUP BY string3
 LIMIT 50000 OFFSET 0
2017-04-08 13:10:23,184:ERROR:root:Couldn't parse datetime string: u'2016/01/0122:18:37.000000'
Traceback (most recent call last):
  File "/home/jeff/venv/lib/python2.7/site-packages/superset/connectors/sqla/models.py", line 544, in query
    df = pd.read_sql_query(qry, con=engine)
  File "/home/jeff/venv/lib/python2.7/site-packages/pandas/io/sql.py", line 431, in read_sql_query
    parse_dates=parse_dates, chunksize=chunksize)
  File "/home/jeff/venv/lib/python2.7/site-packages/pandas/io/sql.py", line 1202, in read_query
    parse_dates=parse_dates)
  File "/home/jeff/venv/lib/python2.7/site-packages/pandas/io/sql.py", line 137, in _wrap_result
    coerce_float=coerce_float)
  File "/home/jeff/venv/lib/python2.7/site-packages/pandas/core/frame.py", line 981, in from_records
    coerce_float=coerce_float)
  File "/home/jeff/venv/lib/python2.7/site-packages/pandas/core/frame.py", line 5372, in _to_arrays
    data = lmap(tuple, data)
ValueError: Couldn't parse datetime string: u'2016/01/0122:18:37.000000'

jeffcarey avatar Apr 08 '17 21:04 jeffcarey

choose explore the slice and change the time column to ds2

clarkchen avatar May 04 '17 17:05 clarkchen

This seems to be fixed after checking the latest master.

jeffcarey avatar May 21 '17 18:05 jeffcarey