You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
400130: Bad Request There was a problem querying the crosstab for view #1126
Describe the bug
When a workbook's view contains no data, the export to excel would throw the following error.
400130: Bad Request
There was a problem querying the crosstab for view
Versions
Details of your environment, including:
Tableau Server version (or note if using Tableau Online) v.2022.1.6
Connected
Item found: MAPD Autopay Refund Report
Traceback (most recent call last):
File "D:\Tableau\server-client-python\samples\export.py", line 127, in
main()
File "D:\Tableau\server-client-python\samples\export.py", line 120, in main
f.writelines(getattr(item, member_name))
File "D:\Program Files\Python37\lib\site-packages\tableauserverclient\server\endpoint\views_endpoint.py", line 149, in _get_view_excel
with closing(self.get_request(url, request_object=req_options, parameters={"stream": True})) as server_response:
File "D:\Program Files\Python37\lib\site-packages\tableauserverclient\server\endpoint\endpoint.py", line 129, in get_request
parameters=parameters,
File "D:\Program Files\Python37\lib\site-packages\tableauserverclient\server\endpoint\endpoint.py", line 72, in _make_request
self._check_status(server_response, url)
File "D:\Program Files\Python37\lib\site-packages\tableauserverclient\server\endpoint\endpoint.py", line 87, in _check_status
raise ServerResponseError.from_response(server_response.content, self.parent_srv.namespace, url)
tableauserverclient.server.endpoint.exceptions.ServerResponseError:
400130: Bad Request
There was a problem querying the crosstab for view 'exxxxxxx-1xxx-xxxx-xxxx-xxxxxxxxxxx'.
Results
400130: Bad Request
There was a problem querying the crosstab for view 'exxxxxxx-1xxx-xxxx-xxxx-xxxxxxxxxxx'.
NOTE: Be careful not to post user names, passwords, auth tokens or any other private or sensitive information.
Jorwoods,
Yes, it is the correct ID as I export it to CSV and Excel with the same ID. Export to CSV works while export to Excel fails.
C:\Users\svc_tabadmin>python D:\Tableau\server-client-python\samples\export.py -s http://txxxxxx.bsc.bscal.com --site "" -u svcUser --xlsx -f “\\bsc\cq\Care1st\FISERV\AUTOPAY ENROLLMENT OOS\Refund.xlsx” e4b22ed2-1ddd-43ad-b836-423f843ff4dd
Signing in...
Server: http://txxxxxx.bsc.bscal.com
Site:
Username: svcUser
==================
Connected
Item found: MAPD Autopay Refund Report
Traceback (most recent call last):
File "D:\Tableau\server-client-python\samples\export.py", line 127, in <module>
main()
File "D:\Tableau\server-client-python\samples\export.py", line 120, in main
f.writelines(getattr(item, member_name))
File "D:\Program Files\Python37\lib\site-packages\tableauserverclient\server\endpoint\views_endpoint.py", line 149, in _get_view_excel
with closing(self.get_request(url, request_object=req_options, parameters={"stream": True})) as server_response:
File "D:\Program Files\Python37\lib\site-packages\tableauserverclient\server\endpoint\endpoint.py", line 129, in get_request
parameters=parameters,
File "D:\Program Files\Python37\lib\site-packages\tableauserverclient\server\endpoint\endpoint.py", line 72, in _make_request
self._check_status(server_response, url)
File "D:\Program Files\Python37\lib\site-packages\tableauserverclient\server\endpoint\endpoint.py", line 87, in _check_status
raise ServerResponseError.from_response(server_response.content, self.parent_srv.namespace, url)
tableauserverclient.server.endpoint.exceptions.ServerResponseError:
400130: Bad Request
There was a problem querying the crosstab for view 'e4b22ed2-1ddd-43ad-b836-423f843ff4dd'.
C:\Users\svc_tabadmin>python D:\Tableau\server-client-python\samples\export.py -s http://txxxxxx.bsc.bscal.com --site "" -u svcUser --csv -f “\\bsc\cq\Care1st\FISERV\AUTOPAY ENROLLMENT OOS\Refund.csv” e4b22ed2-1ddd-43ad-b836-423f843ff4dd
Signing in...
Server: http://txxxxxx.bsc.bscal.com
Site:
Username: svcUser
==================
Connected
Item found: MAPD Autopay Refund Report
saved to \\bsc\cq\Care1st\FISERV\AUTOPAY<file://bsc/cq/Care1st/FISERV/AUTOPAY> ENROLLMENT OOS\Refund.csv
Regards,
JinChong
the CSV output file is generated and it has size zero.
the Excel (xlsx) output file is not generated due to this There was a problem querying the crosstab for view 'e4b22ed2-1ddd-43ad-b836-423f843ff4dd' error.
It'd be a crosstab query fix to avoid checking if there is no data and simply output to an Excel file with size zero.
Thanks for reporting this - it looks like it will need to be a server-side fix to avoid sending back the Bad Request error, so it won't be immediate but we'll get it fixed.
This is not always the case unfortunately. I have found out, that this error occurs also if CSV export returns data, but crosstab does not work at all.
When the export view has no data,
the CSV output file is generated and it has size zero.
the Excel (xlsx) output file is not generated due to this There was a problem querying the crosstab for view 'e4b22ed2-1ddd-43ad-b836-423f843ff4dd' error.
It'd be a crosstab query fix to avoid checking if there is no data and simply output to an Excel file with size zero.
This is not always the case unfortunately. I have found out, that this error occurs also if CSV export returns data, but crosstab does not work at all.
When the export view has no data,
the CSV output file is generated and it has size zero.
the Excel (xlsx) output file is not generated due to this There was a problem querying the crosstab for view 'e4b22ed2-1ddd-43ad-b836-423f843ff4dd' error.
It'd be a crosstab query fix to avoid checking if there is no data and simply output to an Excel file with size zero.
What is the solution for this issue? We now have the same error.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. If this is still relevant, please comment to keep it open.
Activity
jorwoods commentedon Oct 5, 2022
According to the REST API Reference, the error of 400130 is "The view ID in the URI doesn't correspond to a view available on the specified site."
Are you sure you passed in the correct ID or that ID exists on that site?
jtsai01-bsc commentedon Oct 5, 2022
jtsai01-bsc commentedon Oct 11, 2022
When the export view has no data,
It'd be a crosstab query fix to avoid checking if there is no data and simply output to an Excel file with size zero.
jacalata commentedon Oct 15, 2022
Thanks for reporting this - it looks like it will need to be a server-side fix to avoid sending back the Bad Request error, so it won't be immediate but we'll get it fixed.
wlodi83 commentedon Feb 1, 2023
This is not always the case unfortunately. I have found out, that this error occurs also if CSV export returns data, but crosstab does not work at all.
sarikatla-rga commentedon Jul 11, 2024
What is the solution for this issue? We now have the same error.
github-actions commentedon Aug 18, 2026
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. If this is still relevant, please comment to keep it open.