Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected Error - Out of bounds nanosecond timestamp #16487

Closed
kevin-struckhoff opened this issue Aug 27, 2021 · 1 comment · Fixed by #18873
Closed

Unexpected Error - Out of bounds nanosecond timestamp #16487

kevin-struckhoff opened this issue Aug 27, 2021 · 1 comment · Fixed by #18873
Labels
#bug Bug report inactive Inactive for >= 30 days

Comments

@kevin-struckhoff
Copy link

This is a follow on to Issue #16486, using the same dataset and table/data. I changed the chart type to 'Line Chart' and then pressed the 'Run' button. This error Message was displayed: 'Unexpected error Out of bounds nanosecond timestamp: 1-01-01 00:00:00'. Additionally, this stack trace info is from clicking on the 'see more' button:

Traceback (most recent call last):
File "/root/venv/lib64/python3.8/site-packages/pandas/core/arrays/datetimes.py", line 2085, in objects_to_datetime64ns
values, tz_parsed = conversion.datetime_to_datetime64(data)
File "pandas/_libs/tslibs/conversion.pyx", line 350, in pandas._libs.tslibs.conversion.datetime_to_datetime64
TypeError: Unrecognized value type: <class 'str'>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/root/venv/lib64/python3.8/site-packages/superset/viz.py", line 540, in get_df_payload
df = self.get_df(query_obj)
File "/root/venv/lib64/python3.8/site-packages/superset/viz.py", line 288, in get_df
utils.normalize_dttm_col(
File "/root/venv/lib64/python3.8/site-packages/superset/utils/core.py", line 1692, in normalize_dttm_col
df[DTTM_ALIAS] = pd.to_datetime(
File "/root/venv/lib64/python3.8/site-packages/pandas/core/tools/datetimes.py", line 805, in to_datetime
values = convert_listlike(arg._values, format)
File "/root/venv/lib64/python3.8/site-packages/pandas/core/tools/datetimes.py", line 465, in _convert_listlike_datetimes
result, tz_parsed = objects_to_datetime64ns(
File "/root/venv/lib64/python3.8/site-packages/pandas/core/arrays/datetimes.py", line 2090, in objects_to_datetime64ns
raise e
File "/root/venv/lib64/python3.8/site-packages/pandas/core/arrays/datetimes.py", line 2075, in objects_to_datetime64ns
result, tz_parsed = tslib.array_to_datetime(
File "pandas/_libs/tslib.pyx", line 364, in pandas._libs.tslib.array_to_datetime
File "pandas/_libs/tslib.pyx", line 586, in pandas._libs.tslib.array_to_datetime
File "pandas/_libs/tslib.pyx", line 582, in pandas._libs.tslib.array_to_datetime
File "pandas/_libs/tslib.pyx", line 537, in pandas._libs.tslib.array_to_datetime
File "pandas/_libs/tslibs/conversion.pyx", line 507, in pandas._libs.tslibs.conversion.convert_datetime_to_tsobject
File "pandas/_libs/tslibs/np_datetime.pyx", line 113, in pandas._libs.tslibs.np_datetime.check_dts_bounds
pandas._libs.tslibs.np_datetime.OutOfBoundsDatetime: Out of bounds nanosecond timestamp: 1-01-01 00:00:00

end stack trace

Just as in Issue 16486, the query runs fine in my postgres db server. The code should not attempt to define a non-date or non-timestamp column as a timestamp column.

How to reproduce the bug:

  1. Go to Issue 16486 and copy the info to create the table, load the data, and then create the dataset in V1.3.0.
  2. Create a line chart with 'day_of_week' as the time column and group by column. Create SUM(avg_calories) as the metric.
  3. Press Run
  4. See error

Environment (please complete the following information):

  • superset version: 1.3.0
  • python version: 3.8.6
  • node.js version: none
  • any feature flags active: --with-threads --reload --debugger

Screenshot

Unexpected-error-oob

@stale
Copy link

stale bot commented Apr 18, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.

@stale stale bot added the inactive Inactive for >= 30 days label Apr 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
#bug Bug report inactive Inactive for >= 30 days
Projects
None yet
1 participant