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

Error 505 when exporting pivoted .csv with custom CSV_EXPORT configuration #32371

Open
3 tasks
Jockxtar opened this issue Feb 25, 2025 · 1 comment
Open
3 tasks
Labels
data:csv Related to import/export of CSVs

Comments

@Jockxtar
Copy link

Jockxtar commented Feb 25, 2025

Bug description

I'm trying to make the "Export to pivoted .CSV" option work for a (relatively) convoluted pivot table and I found some issues. I will create a bug report for each of them.

Description

Throws "Error 505" if configuration file has CSV_EXPORT = {"encoding": "utf-8", "sep": ";", "decimal": ","}.
Since this configuration doesn't work anyways for the normal csv export, I'm okay with just removing it for now, but a fix would be neat.

Steps to reproduce:

  1. Modify 'CSV_EXPORT' in 'config.py' to "CSV_EXPORT = {"encoding": "utf-8", "sep": ";", "decimal": ","}".
  2. Save changes.
  3. Restart Superset.
  4. Create a "pivot table" graph.
  5. Select a numeric metric
  6. Click on 'Download' -> 'Export to pivoted .CSV'

Screenshots/recordings

No response

Superset version

4.1.1

Python version

3.10

Node version

I don't know

Browser

Firefox

Additional context

Source code:

I'm using version 4.1.1, but I tried updating 'post_processing.py' to match what's in the master branch's 'client_processing.py' since I needed PR #29898 (which doesn't seem to affect this issue).

Feature flags:

"DASHBOARD_RBAC": True,
"ENABLE_TEMPLATE_PROCESSING": True,
"CACHE_QUERY_BY_USER": True,
"CACHE_IMPERSONATION": True

Checklist

  • I have searched Superset docs and Slack and didn't find a solution to my problem.
  • I have searched the GitHub issue tracker and didn't find a similar bug report.
  • I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
Copy link

dosubot bot commented Feb 25, 2025

The "Error 505" you're encountering when exporting a pivoted CSV with the custom CSV_EXPORT configuration might be related to how Superset handles different encodings, separators, and decimal formats during CSV export. Unfortunately, specific details on how Superset manages these configurations or any error handling mechanisms for them are not available in the current knowledge base.

However, the issue might be due to the custom separator (sep: ";") and decimal (decimal: ",") settings conflicting with the expected format during the export process. Since you mentioned that this configuration doesn't work for normal CSV export either, it might be worth testing with default settings or different combinations to identify the root cause.

Additionally, since you have already tried updating post_processing.py to match the master branch's client_processing.py, it seems that PR #29898 does not address this specific issue. You might want to check if there are any recent updates or patches related to CSV export in the Superset repository that could resolve this problem.

For now, reverting to default CSV export settings or experimenting with different configurations might help as a temporary workaround.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@dosubot dosubot bot added the data:csv Related to import/export of CSVs label Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data:csv Related to import/export of CSVs
Projects
None yet
Development

No branches or pull requests

1 participant