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

PDF export dashboards which are partially loaded #310

Open
alkeshhc1 opened this issue Oct 11, 2024 · 2 comments
Open

PDF export dashboards which are partially loaded #310

alkeshhc1 opened this issue Oct 11, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@alkeshhc1
Copy link

Hi,
I'm exporting a dashboard as a pdf and cycle through different parameters to get separate pdfs and save them locally.

Around half the PDFs are exported with no issue and successfully output the pdf as expected, although half of the PDFs have many blanks visuals where the data has not loaded.

When going to the URL with the parameter filter exporting the PDF manually in the web-browser, the outputs look as intended.

How can I ensure tabcmd has waited for the visuals to load before exporting the PDFs?
It consistently happens on the same parameters/views. I've also tried to refresh the data in Tableau web, but the PDFs still fail to export correctly using tabcmd.

@jacalata jacalata added the bug Something isn't working label Oct 11, 2024
@jacalata
Copy link
Contributor

I have not come across this before - can you share the parameters you're passing in that fail, and any comparison command that does work on the same viz? Is there anything in common between the vizzes that it fails on?

@alkeshhc1
Copy link
Author

Hi, I'm parsing a single parameter (name). The parameter works when I paste it into a web browser and there's no strange characters/commas/dashes which may implicate it. It's only uppercase letters with spaces which (replaced with %20 and that seems to work).
Also, there's no commonality with the parameters which fail and length of parameter text.

Yes, there's a common set of worksheets which fail in the export in one dashboard (the same workseets show as blank when exporting using tabcmd, but have content when exporting via the web browser, which is why I'm suspicious that it's being exported before the data has loaded).

The dashboard doesn't do anything fancy with actions etc, it's basically filter on the parameter and export.

There's another dashboard which I have where with certain parameters, the view doesn't change with tabcmd exports, but does change when doing it in a web-browser. Again, this feels like a wait till information is updated issue, but I'll park this issue for now till the above is solved in case it's the same fix.

I've tried to use tabcmd.exe command line and python, but get the same results, tabcmd v2.0.14 and v2.0.13

Sample code below:
import tabcmd
import os
os.system("tabcmd login --server https://eu-west-1a.online.tableau.com --site [SITE] --token-name [TOKENNAME] --token-value [TOKENVALUE]")
command1 = "tabcmd export "[workbook]/[dashboard]?refresh=yes&Parameters.Name=[NAME]%20[NAME2]%20[NAME3]""
command2 = " --pdf --pagesize a4 -f "
command3 = ""C:\Users\[USERPROFILE]\Desktop\[NAME] [NAME2] [NAME3].pdf""
command4 = command1+command2+command3
os.system(command4)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants