divinorum-webb / tableau-api-lib

An API library that allows developers to call on the methods listed in Tableau's REST API documentation.
MIT License
96 stars 34 forks source link

MaxRetryError #62

Closed test145wqwe closed 2 years ago

test145wqwe commented 2 years ago

Hi, I'm trying to use tableau api to read data from my organisation's Tableau server, but am receiving this error. Any ideas what's going wrong here?

urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='com', port=443): Max retries exceeded with url: //api/3.1/serverinfo (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x00000207EA9B8B38>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond',))

This was my clode:

from tableau_api_lib import TableauServerConnection

tableau_config = { 'tableau_prod': { 'server': 'https://.com/', 'api_version': '3.1', 'personal_access_token_name': '', 'personal_access_token_secret': '', 'site_name': '', 'site_url': '', 'cache_buster': '', 'temp_dir': '' } }

connection = TableauServerConnection(tableau_config) connection.sign_in()

divinorum-webb commented 2 years ago

Hi @test145wqwe, I'm assuming the values that are empty strings in your sample code are populated on your end? And is your server really running on version 2018.2 (that is the version that uses REST API version 3.1)?

If so, then from your error it looks like there's an issue with SSL. Some common things to look for or ask your IT team (or whoever manages your Tableau Server environment): 1) Is your server actually using SSL certificates? If not, then specifying https will fail and you would need to specify http instead. 2) You could try specifying the address of the server like myserver.com instead of https://myserver.com. 3) Check that the REST API is enabled and that your server is not air-gapped. If your server is configured on some sort of intranet that does not have access to the internet, then your API requests will not reach the server.

Hope that helps!