← 输入框|github.com|刷新
Skip to content

Refresh Workbook Issue #324

Closed
Closed

Description

@rjk24

I am trying to refresh a workbook on the server and am running the following commands and receiving the following errors. I am using the list.py sample code and the refresh.py sample code to do this. I have not been able to determine what I am doing wrong and the tableau server logs are not displaying anything of use.

The first thing I am doing is finding my workbook id by using the list command. That portion is working great.
python3 list.py --server 'http://tableau.abc.edu' --username BISTableau workbook | grep TestingRefresh
Password:
14cb41f0-efcc-43d8-b134-f962582fffe4 TestingRefresh

Then I try to pass that ID into the refresh and I get an error 404006 Resource not Found. I have gone into the postgres database and tried all the different IDs for this workbook and they all return the same error.

python3 refresh.py --server 'http://tableau.abc.edu' --username BISTableau workbook 14cb41f0-efcc-43d8-b134-f962582fffe4
Password:
Traceback (most recent call last):
File "refresh.py", line 54, in
main()
File "refresh.py", line 50, in main
print(refresh_func(resource))
File "/usr/lib/python3.4/site-packages/tableauserverclient-0.6.3-py3.4.egg/tableauserverclient/server/endpoint/endpoint.py", line 108, in wrapper
File "/usr/lib/python3.4/site-packages/tableauserverclient-0.6.3-py3.4.egg/tableauserverclient/server/endpoint/workbooks_endpoint.py", line 58, in refresh
File "/usr/lib/python3.4/site-packages/tableauserverclient-0.6.3-py3.4.egg/tableauserverclient/server/endpoint/endpoint.py", line 78, in post_request
File "/usr/lib/python3.4/site-packages/tableauserverclient-0.6.3-py3.4.egg/tableauserverclient/server/endpoint/endpoint.py", line 43, in _make_request
File "/usr/lib/python3.4/site-packages/tableauserverclient-0.6.3-py3.4.egg/tableauserverclient/server/endpoint/endpoint.py", line 55, in _check_status
tableauserverclient.server.endpoint.exceptions.ServerResponseError:

    404006: Resource Not Found
            Workbook '<tableauserverclient.models.workbook_item.WorkbookItem object at 0x7f5ab28cd470>' could not be found.

Any help on this work be greatly appreciated.

Activity

  1. t8y8 commented on Jul 27, 2018

    @t8y8
    Contributor

    It looks like the sample and the method are a little mismatched:

    The endpoint expects an id:

        @api(version="2.8")
        def refresh(self, workbook_id):
            url = "{0}/{1}/refresh".format(self.baseurl, workbook_id)
            empty_req = RequestFactory.Empty.empty_req()
            server_response = self.post_request(url, empty_req)
            new_job = JobItem.from_response(server_response.content, self.parent_srv.namespace)[0]
            return new_job
    

    But the sample takes the id, gets the workbook object, then passes the object to the refresh call.

        with server.auth.sign_in(tableau_auth):
            if args.resource_type == "workbook":
                # Get the workbook by its Id to make sure it exists
                resource = server.workbooks.get_by_id(args.resource_id)
    
                # trigger the refresh, you'll get a job id back which can be used to poll for when the refresh is done
                results = server.workbooks.refresh(resource)
    
  2. rjk24 commented on Jul 30, 2018

    @rjk24
    Author

    Thank you. This helped and I was able to get it to work. I appreciate the quick response.

  3. reopened this on Jul 30, 2018
  4. t8y8 commented on Aug 1, 2018

    @t8y8
    Contributor

    Glad to hear it! We'll get the sample fixed up as well.

  5. srirammedavaram commented on Oct 12, 2018

    @srirammedavaram

    For the benefit of others: Replace results = server.workbooks.refresh(resource) with
    results = server.workbooks.refresh(workbook_id=args.resource_id)

  6. saketdabi commented on Nov 16, 2018

    @saketdabi

    I am getting an error like this This endpoint is not available in API version 2.3. Requires 2.8, please help.
    my script is simple
    import tableauserverclient as TSC
    tableau_auth = TSC.TableauAuth(user, password)
    server = TSC.Server('Address')
    server.version = '2.3'
    resource_id= 6109
    with server.auth.sign_in(tableau_auth):
    print('connection made')
    print(server.version)
    #resource = server.workbooks.get_by_id(resource_id)
    server.workbooks.refresh(workbook_id='6109')

    server.auth.sign_out()
    print('connection closed')

  7. t8y8 commented on Nov 19, 2018

    @t8y8
    Contributor

    6109 isn't a valid workbook ID.

    The workbook ID should be something like "dd9a137f-30f2-4afb-b733-9e850d133c57" and is what is returned in a regular get call for workbooks.

  8. saketdabi commented on Nov 19, 2018

    @saketdabi

    that worked but now i am getting .EndpointUnavailableError: This endpoint is not available in API version 2.3. Requires 2.8 error. how is solve for this ?

  9. edwardsbt03 commented on Jan 9, 2019

    @edwardsbt03

    that worked but now i am getting .EndpointUnavailableError: This endpoint is not available in API version 2.3. Requires 2.8 error. how is solve for this ?

    Try setting your server class to use the server version. This worked for me.

    server = TSC.Server('Address', use_server_version=True)

  10. shinchris commented on Jan 30, 2019

    @shinchris
    Contributor

    Sample fixed: #342

  11. ananthcj commented on Oct 30, 2020

    @ananthcj

    I was troubleshooting the issues in sequence,

    1. I got the API version error which I fixed by using server = TSC.Server('Address', use_server_version=True)
    2. But after using this Im getting below error which i dont used to get earlier.

    requests.exceptions.SSLError: HTTPSConnectionPool(host='servername.com', port=443): Max retries exceeded with url: /api/2.4/serverInfo (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:777)'),))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions