Skip to content

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

@Jockxtar

Description

@Jockxtar

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    data:csvRelated to import/export of CSVs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions