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

CSV download fails if query tab has atypical characters #9141

Closed
3 tasks done
serenajiang opened this issue Feb 14, 2020 · 4 comments
Closed
3 tasks done

CSV download fails if query tab has atypical characters #9141

serenajiang opened this issue Feb 14, 2020 · 4 comments
Labels
!deprecated-label:bug Deprecated label - Use #bug instead inactive Inactive for >= 30 days

Comments

@serenajiang
Copy link
Contributor

SQL Lab CSV download fails if the tab name has Chinese characters in it.

Expected results

Successful download

Actual results

INTERNAL SERVER ERROR

Logs:

File "/usr/local/lib/python3.6/dist-packages/gunicorn/http/wsgi.py", line 326, in write
UnicodeEncodeError: 'latin-1' codec can't encode characters in position 223-227: ordinal not in range(256)

How to reproduce the bug

  1. Change sqllab tab name to 你好
  2. Run an arbitrary query
  3. Download csv
  4. 😢

Environment

(please complete the following information):

  • superset version: up to date with master (last commit a005e4568f14f32be23c317dc484b904ddc71dd9)
  • python version: 3.6.8

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.
@etr2460
Copy link
Member

etr2460 commented Feb 14, 2020

Note that this failure may be specific to implementations where the flask server is run with gunicorn. I'm not sure if this is a Superset bug or a gunicorn bug

@crazyplum
Copy link

Same problems discover here.

It seemed to be a superset bug when dealing with header which should be latin-1 encoding.
(May be related to benoitc/gunicorn#1778 )
And a possible solution provided here: #5377

@dpgaspar
Copy link
Member

I'm able to reproduce

@dpgaspar dpgaspar added the !deprecated-label:bug Deprecated label - Use #bug instead label Feb 18, 2020
@stale
Copy link

stale bot commented Apr 18, 2020

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, 2020
@stale stale bot closed this as completed Apr 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
!deprecated-label:bug Deprecated label - Use #bug instead inactive Inactive for >= 30 days
Projects
None yet
Development

No branches or pull requests

4 participants