1 Reply Latest reply on Jul 27, 2018 1:17 PM by Jeff Strauss

    Tableau Workbook Refresh Using Tableau Server Client and API

    Ryan Keen

      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, which are found GitHub - tableau/server-client-python: A Python library for the Tableau Server REST API . 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:XXXXXXX
      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:XXXXXXX
      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.