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

Exporting to PDF does not work if there is a map visualization of the type deck.gl Polygon. #31579

Open
3 tasks done
tonny-skynet opened this issue Dec 20, 2024 · 3 comments
Open
3 tasks done
Labels
viz:charts:deck.gl Related to deck.gl charts

Comments

@tonny-skynet
Copy link

tonny-skynet commented Dec 20, 2024

Bug description

We have a need to export to PDF with map visualizations of the deck.gl Polygon type. Unfortunately, this feature does not work if there is a chart of the deck.gl Polygon type.
But for chart types other than deck.gl Polygon, exporting to PDF works. Does Superset not support rendering WebGL-based elements into static formats like PDF?

How to reproduce the bug

  1. Go to dashboard with map visualizations of the deck.gl Polygon type,
  2. Select Download > Export to PDF
  3. Chart data should be exported to PDF file.

Screenshots/recordings

screen.recording.export.to.pdf.mov

log superset:

Dec 20 14:32:17   superset.sh[800977]: HTTPException

Dec 20 14:32:17   superset.sh[800977]: Traceback (most recent call last):

Dec 20 14:32:17   superset.sh[800977]:   File "/home/superset/venv/lib64/python3.9/site-packages/flask/app.py", line 1484, in full_dispatch_request

Dec 20 14:32:17   superset.sh[800977]:     rv = self.dispatch_request()

Dec 20 14:32:17   superset.sh[800977]:   File "/home/superset/venv/lib64/python3.9/site-packages/flask/app.py", line 1458, in dispatch_request

Dec 20 14:32:17   superset.sh[800977]:     self.raise_routing_exception(req)

Dec 20 14:32:17   superset.sh[800977]:   File "/home/superset/venv/lib64/python3.9/site-packages/flask/app.py", line 1440, in raise_routing_exception

Dec 20 14:32:17   superset.sh[800977]:     raise request.routing_exception  # type: ignore

Dec 20 14:32:17   superset.sh[800977]:   File "/home/superset/venv/lib64/python3.9/site-packages/flask/ctx.py", line 353, in match_request

Dec 20 14:32:17   superset.sh[800977]:     result = self.url_adapter.match(return_rule=True)  # type: ignore

Dec 20 14:32:17   superset.sh[800977]:   File "/home/superset/venv/lib64/python3.9/site-packages/werkzeug/routing/map.py", line 629, in match

Dec 20 14:32:17   superset.sh[800977]:     raise NotFound() from None

Dec 20 14:32:17   superset.sh[800977]: werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.

Dec 20 14:32:17   superset.sh[800977]: HTTPException

Dec 20 14:32:17   superset.sh[800977]: Traceback (most recent call last):

Dec 20 14:32:17   superset.sh[800977]:   File "/home/superset/venv/lib64/python3.9/site-packages/flask/app.py", line 1484, in full_dispatch_request

Dec 20 14:32:17   superset.sh[800977]:     rv = self.dispatch_request()

Dec 20 14:32:17   superset.sh[800977]:   File "/home/superset/venv/lib64/python3.9/site-packages/flask/app.py", line 1458, in dispatch_request

Dec 20 14:32:17   superset.sh[800977]:     self.raise_routing_exception(req)

Dec 20 14:32:17   superset.sh[800977]:   File "/home/superset/venv/lib64/python3.9/site-packages/flask/app.py", line 1440, in raise_routing_exception

Dec 20 14:32:17   superset.sh[800977]:     raise request.routing_exception  # type: ignore

Dec 20 14:32:17   superset.sh[800977]:   File "/home/superset/venv/lib64/python3.9/site-packages/flask/ctx.py", line 353, in match_request

Dec 20 14:32:17   superset.sh[800977]:     result = self.url_adapter.match(return_rule=True)  # type: ignore

Dec 20 14:32:17   superset.sh[800977]:   File "/home/superset/venv/lib64/python3.9/site-packages/werkzeug/routing/map.py", line 629, in match

Dec 20 14:32:17   superset.sh[800977]:     raise NotFound() from None

Dec 20 14:32:17   superset.sh[800977]: werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.

Superset version

4.0.2

Python version

3.9

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 Dec 20, 2024

Hello @tonny-skynet! I'm here to help you with any bugs, questions, or contributions. Let's tackle this together!

Superset uses the dom-to-pdf library to export visualizations to PDF, which may not support rendering WebGL content, such as deck.gl visualizations, into static formats like PDF [1]. This could be the reason why exporting deck.gl Polygon visualizations to PDF is not working as expected. Unfortunately, there is no specific documentation or code comments in the Superset codebase that address handling WebGL content during PDF export or any known limitations with exporting deck.gl visualizations [2].

You might need to explore alternative methods or plugins that can handle WebGL content for exporting to static formats, as the current implementation may not support this feature.

To continue talking to Dosu, mention @dosu.


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

@dosubot dosubot bot added the viz:charts:deck.gl Related to deck.gl charts label Dec 20, 2024
@arcuellar88
Copy link

We have a similar issue with all deck.gl charts. Downloading as image works fine. Downloading as PDF doesn't work.
Superset 4.1.1

@rusackas
Copy link
Member

Right... not sure if @fisjac or @kgabryje or @eschutho know the current state of affairs, but I think the PLAYWRIGHT_REPORTS_AND_THUMBNAILS addresses this, since it supports WebGL and other headless browsers might not.

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

No branches or pull requests

3 participants