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

AttributeError: 'NoneType' object has no attribute 'index' - Export CSV on filter box #14189

Closed
3 tasks done
jerwen opened this issue Apr 16, 2021 · 2 comments · Fixed by #16592
Closed
3 tasks done

AttributeError: 'NoneType' object has no attribute 'index' - Export CSV on filter box #14189

jerwen opened this issue Apr 16, 2021 · 2 comments · Fixed by #16592
Labels
#bug Bug report

Comments

@jerwen
Copy link

jerwen commented Apr 16, 2021

An error happens when trying to export a filter box to CSV.

Expected results

My opinion would be to discard the Export CSV button for filter BOX since, it has never worked and no one seems to have ever required it.

Actual results

An html page with an error message when clicking on the Export CSV button

Screenshots

Capture d’écran 2021-04-16 à 11 07 55

How to reproduce the bug

  1. Click on the Export CSV button of a filter box

Capture d’écran 2021-04-16 à 11 12 44

  1. See error

Capture d’écran 2021-04-16 à 11 07 55

Environment

  • docker image : apache/superset:1.0.1
  • superset version: 1.0.1
  • python version: 3.7
  • node.js version: unknown

Checklist

  • I have checked the superset logs for python stacktraces and included it here as text if there are any.
Traceback (most recent call last):
  File "/app/superset/views/base.py", line 181, in wraps
    return f(self, *args, **kwargs)
  File "/app/superset/utils/log.py", line 164, in wrapper
    value = f(*args, **kwargs)
  File "/app/superset/utils/cache.py", line 152, in wrapper
    return f(*args, **kwargs)
  File "/app/superset/views/utils.py", line 451, in wrapper
    return f(*args, **kwargs)
  File "/app/superset/views/core.py", line 618, in explore_json
    return self.generate_json(viz_obj, response_type)
  File "/app/superset/views/core.py", line 440, in generate_json
    viz_obj.get_csv(),
  File "/app/superset/viz.py", line 622, in get_csv
    include_index = not isinstance(df.index, pd.RangeIndex)
AttributeError: 'NoneType' object has no attribute 'index'

Additional context

RAS

@jerwen jerwen added the #bug Bug report label Apr 16, 2021
@suddjian
Copy link
Member

Could you provide some information on the use case for exporting a filter box to a CSV? There is a new Native Filters feature that will not use the filter box, and currently exporting a Native Filter to a CSV is not possible.

@jerwen
Copy link
Author

jerwen commented Apr 27, 2021

Thank you for your answer.
My point is that there are no known use case at this time for exporting a filter box to a CSV. Thus my request to simply discard the option in the dropdown menu for filter box, so we can avoid irritating error message for our users who often click on that button.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
#bug Bug report
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants