question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

400011: Bad Request when publishing .hyper datasource

See original GitHub issue

After reviewing issue #488 , I found that I am experiencing the issue on single table extracts as opposed to multi.

any help and suggestions would be appreciated. I have tried several variations in specifying file paths and publish modes but all fail with a bad request.

Thanks!

Here is my code

import tableauserverclient as TSC
import os

cwd = os.getcwd()
file = 'Groups.hyper'

tableau_auth = TSC.TableauAuth(username,password)
server = TSC.Server('http://'+server_name)
server.use_server_version()
server.add_http_options({'verify': False})

with server.auth.sign_in(tableau_auth):
    new_datasource = TSC.DatasourceItem(project_id, 'Groups Extract python')
    new_datasource = server.datasources.publish(new_datasource,
    os.path.join(cwd,file),
    'CreateNew')

Running with error

Traceback (most recent call last):
  File "tester.py", line 20, in <module>
    'CreateNew')
  File "C:\Users\amsmith1\Desktop\tableauUserMgmt\venv\lib\site-packages\tableauserverclient\server\endpoint\endpoint.py", line 127, in wrapper
    return func(self, *args, **kwargs)
  File "C:\Users\amsmith1\Desktop\tableauUserMgmt\venv\lib\site-packages\tableauserverclient\server\endpoint\endpoint.py", line 165, in wrapper
    return func(self, *args, **kwargs)
  File "C:\Users\amsmith1\Desktop\tableauUserMgmt\venv\lib\site-packages\tableauserverclient\server\endpoint\endpoint.py", line 165, in wrapper
    return func(self, *args, **kwargs)
  File "C:\Users\amsmith1\Desktop\tableauUserMgmt\venv\lib\site-packages\tableauserverclient\server\endpoint\datasources_endpoint.py", line 204, in publish
    server_response = self.post_request(url, xml_request, content_type)
  File "C:\Users\amsmith1\Desktop\tableauUserMgmt\venv\lib\site-packages\tableauserverclient\server\endpoint\endpoint.py", line 102, in post_request
    content_type=content_type)
  File "C:\Users\amsmith1\Desktop\tableauUserMgmt\venv\lib\site-packages\tableauserverclient\server\endpoint\endpoint.py", line 55, in _make_request
    self._check_status(server_response)
  File "C:\Users\amsmith1\Desktop\tableauUserMgmt\venv\lib\site-packages\tableauserverclient\server\endpoint\endpoint.py", line 70, in _check_status
    raise ServerResponseError.from_response(server_response.content, self.parent_srv.namespace)
tableauserverclient.server.endpoint.exceptions.ServerResponseError:

        400011: Bad Request
                There was a problem publishing the file 'Groups.hyper'.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:2
  • Comments:12 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
Rchendercommented, Sep 1, 2020

In my situation, I would get an error such as: 400011: Bad Request There was a problem publishing the file '26353:e93e1c2aa6fd41169169a8de2a438ca4-1:0'. when publishing very large extracts.

This was fixed by utilizing the as_job=True option on server.datasources.publish()

2reactions
jla2wcommented, Nov 8, 2022

EDIT: Found solution for my situation. I was using option 2 in this link https://help.tableau.com/current/api/hyper_api/en-us/docs/hyper_api_publish.html#publish-single-table-hyper-files

The key was to create a table object called “Extract” in schema “Extract” for hyper file publish to work. Not sure if same as others but when I did that with python code ala below it worked

my_table = TableName(“Extract”, “Extract”)

Then pass my_table into the frame_to_hyper call…

original message: I am also having same issue

tableauserverclient==0.11 python==3.6.5 tableau server==2019.2.3 (20192.19.0818.2120)

I have tried using different REST api versions to no avail. Also, I can publish a workbook successfully using all the same set up code, only my attempt to publish a datasource (hyper file) fails with 400011

Read more comments on GitHub >

github_iconTop Results From Across the Web

400011: Bad Request. There was a problem publishing the file
I am trying to append data using Tableau REST API with python. This is running fine but after sometime it is failing and...
Read more >
Tableau REST API 400 Error, Response Code 400011
Re-save as a TWBX and publish the TWBX; Publish your datasource to data server first, and connect the workbook to that datasource on...
Read more >
Publish to Tableau - 400011 Bad Request Error
Error Code 400011: Bad Request -- There was a problem publishing the file '6539:59797cf0fac84b0986d8d74a653df567-1:0'.
Read more >
ERROR: "[LDTM_0072] Utils : Tableau Rest Runner - Search
The call to INFAADPDeinitDataSession failed in the writer ... with bad request error as the data source exists however with .hyper format.
Read more >
Tableau to Server - Execute failed: invalid UTF-8 sequence
(Error code: 400011)” This is from Tableau's API, which would indicate that the error is not with Knime but with Tableau not excepting...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found