Received error when connect Tableau using Python

Viewed 308

I am using tableau_api_lib to access Tableau view but was not able to connect. My code:

from tableau_api_lib import TableauServerConnection
from tableau_api_lib.utils import querying

tableau_server_config = {
        'my_env': {
                'server': 'https://tableauserver.com/',
                'api_version': '3.8',
                'username': 'xxx',
                'password': 'xxx',
                'site_name': 'xxx',
                'site_url': 'https://tableauserver.com/#/site/xxx/'
        }
}

conn = TableauServerConnection(config_json=tableau_server_config, env='my_env')

conn.sign_in()

Here is the error:

requests.exceptions.SSLError: HTTPSConnectionPool(host='https://tableauserver.com/', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1108)')))

It seems to be related to SSL, can anyone help?

1 Answers

As described here and the error message indicates, this error is due to certificate verify failed due to self-signed certificate.

Try to use HTTP instead of HTTPS

Related