Unable to connect to tableau server 10.5 using TableauServerClient python library
Unable to connect to tableau server 10.5 using TableauServerClient python library
I have used following python code to connect to Tableau server :
import tableauserverclient as TSC
tableau_auth = TSC.TableauAuth('username', 'password')
server = TSC.Server('https://server_name.com/')
server.auth.sign_in(tableau_auth)
But I am getting following error:
Traceback (most recent call last):
File "C:Program FilesAnaconda3libsite-packagesurllib3contribpyopenssl.py", line 444, in wrap_socket
cnx.do_handshake()
File "C:Program FilesAnaconda3libsite-packagesOpenSSLSSL.py", line 1443, in do_handshake
self._raise_ssl_error(self._ssl, result)
File "C:Program FilesAnaconda3libsite-packagesOpenSSLSSL.py", line 1191, in _raise_ssl_error
_raise_current_error()
File "C:Program FilesAnaconda3libsite-packagesOpenSSL_util.py", line 48, in exception_from_error_queue
raise exception_type(errors)
OpenSSL.SSL.Error: [('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:Program FilesAnaconda3libsite-packagesurllib3connectionpool.py", line 600, in urlopen
chunked=chunked)
File "C:Program FilesAnaconda3libsite-packagesurllib3connectionpool.py", line 343, in _make_request
self._validate_conn(conn)
File "C:Program FilesAnaconda3libsite-packagesurllib3connectionpool.py", line 849, in _validate_conn
conn.connect()
File "C:Program FilesAnaconda3libsite-packagesurllib3connection.py", line 356, in connect
ssl_context=context)
File "C:Program FilesAnaconda3libsite-packagesurllib3utilssl_.py", line 359, in ssl_wrap_socket
return context.wrap_socket(sock, server_hostname=server_hostname)
File "C:Program FilesAnaconda3libsite-packagesurllib3contribpyopenssl.py", line 450, in wrap_socket
raise ssl.SSLError('bad handshake: %r' % e)
ssl.SSLError: ("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')],)",)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:Program FilesAnaconda3libsite-packagesrequestsadapters.py", line 445, in send
timeout=timeout
File "C:Program FilesAnaconda3libsite-packagesurllib3connectionpool.py", line 638, in urlopen
_stacktrace=sys.exc_info()[2])
File "C:Program FilesAnaconda3libsite-packagesurllib3utilretry.py", line 398, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='server_name.com', port=443): Max retries exceeded with url: //api/2.3/auth/signin (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')],)",),))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "", line 1, in
File "C:Program FilesAnaconda3libsite-packagestableauserverclientserverendpointendpoint.py", line 114, in wrapper
return func(self, *args, **kwargs)
File "C:Program FilesAnaconda3libsite-packagestableauserverclientserverendpointauth_endpoint.py", line 30, in sign_in
**self.parent_srv.http_options)
File "C:Program FilesAnaconda3libsite-packagesrequestssessions.py", line 559, in post
return self.request('POST', url, data=data, json=json, **kwargs)
File "C:Program FilesAnaconda3libsite-packagesrequestssessions.py", line 512, in request
resp = self.send(prep, **send_kwargs)
File "C:Program FilesAnaconda3libsite-packagesrequestssessions.py", line 622, in send
r = adapter.send(request, **kwargs)
File "C:Program FilesAnaconda3libsite-packagesrequestsadapters.py", line 511, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='server_name.com', port=443): Max retries exceeded with url: //api/2.3/auth/signin (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')],)",),))
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.