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

Export to Excel leading to Internal Server Error #32389

Open
3 tasks done
JackSik-stack opened this issue Feb 26, 2025 · 5 comments
Open
3 tasks done

Export to Excel leading to Internal Server Error #32389

JackSik-stack opened this issue Feb 26, 2025 · 5 comments
Labels
viz:charts:export Related to exporting charts

Comments

@JackSik-stack
Copy link

JackSik-stack commented Feb 26, 2025

Bug description

  1. When clicking Export to excel in the download chart option, for various charts I encounter this error: Internal Server Error 500. These charts include pivot charts, mixed charts, bar charts etc.

  2. With some different charts, when I do the same I get a raw unformatted output in a new tab instead of getting an excel file.

These issues are only occurring when I try to extract to an excel file. Otherwise, the csv option is working fine.
For more details I am using Version: 3.0.0.

Screenshots/recordings

Image

Superset version

4.0.2

Python version

Not applicable

Node version

Not applicable

Browser

Chrome

Additional context

No response

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 26, 2025

Hey there, @JackSik-stack! I'm here to help you with any bugs, questions, or contributions you have for Superset. Let's tackle this Excel export issue together!

I found a similar open issue titled Download to Excel: Error 500 (caused by Date column), which was last updated on April 09, 2024. This issue is still open and does not have any comments or references that might provide a solution [1].

Regarding your issue, there are a few things to consider:

  1. Export Functionality Differences: Superset differentiates between exporting to CSV and Excel by using different functions and menu keys. The CSV export uses exportCSV and exportFullCSV, while the Excel export uses exportXLSX [2].

  2. Backend Handling: In the backend, Superset checks the result_format attribute to determine whether to export as CSV or Excel. For Excel, it applies column types and uses excel.df_to_excel to generate the file [3].

  3. Logging: There are logging mechanisms in place for the Export to Excel process, which might help in diagnosing the issue. You can check the logs for any relevant information, especially in the SqlResultExportCommand class [4].

  4. Feature Flags: The AllowFullCsvExport feature flag affects the availability of the "Export to full Excel" option. Ensure this is configured correctly if you are trying to use this feature [5].

You might want to check the server logs for any additional error messages that could provide more insight into the cause of the Internal Server Error. Additionally, reviewing the configuration settings related to Excel export might help identify any misconfigurations.

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 viz:charts:export Related to exporting charts label Feb 26, 2025
@hainenber
Copy link
Contributor

I can't seem to reproduce this in v4. Are you experiencing this in production Superset?

@JackSik-stack
Copy link
Author

Yes, I am.

@rusackas
Copy link
Member

Can you upgrade to a supported version of Superset and see if it's still happening? 5.0.0 is available for testing, but we're currently only supporting 4.x in the meantime. How big of a file are you trying to export? The issue may well be a timeout happening, if it's large.

@JackSik-stack
Copy link
Author

Unfortunately, I can't upgrade it as I don't have that kind of authorization in my current position. Is there any other way to fix this, if it is possible?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
viz:charts:export Related to exporting charts
Projects
None yet
Development

No branches or pull requests

3 participants