michellethomas opened a new issue #17224: URL: https://github.com/apache/superset/issues/17224
A user reported an error on a chart with data that contains "Nan" values: `TypeError: Could not convert "NaN" to numeric`. It looks like this is happening in post_processing. #### How to reproduce the bug 1. Create a time-series line chart using data that contains "Nan" values. For us this occurred using presto where the user's query was occasionally dividing by 0 and this occurred grouping by a column with sparse data. 2. Run the query ### Expected results Chart loaded You can see the expected result when switching to the old line chart (the chart shows up correctly using the old line chart). ### Actual results 500 error ### Environment (please complete the following information): - browser type and version: - superset version: `superset version` - python version: `python --version` - node.js version: `node -v` - any feature flags active: ### Checklist Make sure to follow these steps before submitting your issue - thank you! - [x] 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. checked on a version of superset a few days old. - [x] I have checked the issue tracker for the same issue and I haven't found one similar. ### Additional context Stacktrace: ``` File "/srv/superset-internal/superset-fork/superset/common/query_actions.py", line 186, in get_query_results return result_func(query_context, query_obj, force_cached) File "/srv/superset-internal/superset-fork/superset/common/query_actions.py", line 98, in _get_full payload = query_context.get_df_payload(query_obj, force_cached=force_cached) File "/srv/superset-internal/superset-fork/superset/common/query_context.py", line 468, in get_df_payload query_result = self.get_query_result(query_obj) File "/srv/superset-internal/superset-fork/superset/common/query_context.py", line 274, in get_query_result df = query_object.exec_post_processing(df) File "/srv/superset-internal/superset-fork/superset/common/query_object.py", line 408, in exec_post_processing df = getattr(pandas_postprocessing, operation)(df, **options) File "/srv/superset-internal/superset-fork/superset/utils/pandas_postprocessing.py", line 145, in wrapped return func(df, **options) File "/srv/superset-internal/superset-fork/superset/utils/pandas_postprocessing.py", line 282, in pivot df = df.pivot_table( TypeError: Could not convert "NaN" to numeric ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
