[英]Cannot connect to Tableau Server using Tableau Server Client (TSC-Python)
我的腳本(我沒有使用 saml 進行身份驗證):
import tableauserverclient as TSC
tableau_auth = TSC.TableauAuth('myusername', 'mypassword', site_id='sitename')
server = TSC.Server('tableauserverurl')
server.auth.sign_in(tableau_auth)
錯誤:
Traceback (most recent call last):
File "C:\Users\Admin\AppData\Local\Programs\Python\Python37\lib\site-packages\tableauserverclient\server\endpoint\endpoint.py", line 70, in _check_status
raise ServerResponseError.from_response(server_response.content, self.parent_srv.namespace)
File "C:\Users\Admin\AppData\Local\Programs\Python\Python37\lib\site-packages\tableauserverclient\server\endpoint\exceptions.py", line 17, in from_response
parsed_response = ET.fromstring(resp)
File "C:\Users\Admin\AppData\Local\Programs\Python\Python37\lib\xml\etree\ElementTree.py", line 1315, in XML
parser.feed(text)
xml.etree.ElementTree.ParseError: mismatched tag: line 31, column 79
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:/Users/Admin/PycharmProjects/T_SERVER_test/server_description.py", line 7, in <module>
server.auth.sign_in(tableau_auth)
File "C:\Users\Admin\AppData\Local\Programs\Python\Python37\lib\site-packages\tableauserverclient\server\endpoint\endpoint.py", line 127, in wrapper
return func(self, *args, **kwargs)
File "C:\Users\Admin\AppData\Local\Programs\Python\Python37\lib\site-packages\tableauserverclient\server\endpoint\auth_endpoint.py", line 32, in sign_in
self._check_status(server_response)
File "C:\Users\Admin\AppData\Local\Programs\Python\Python37\lib\site-packages\tableauserverclient\server\endpoint\endpoint.py", line 76, in _check_status
raise NonXMLResponseError(server_response.content)
tableauserverclient.server.endpoint.exceptions.NonXMLResponseError: b'<!DOCTYPE html><html><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><title>Page Not Found</title><style>html {\n height: 100%;\n width: 100%;\n}\nbody {\n position: absolute;\n width: 100%;\n margin: 0;\n top: 20%;\n font-family: Verdana, Geneva, sans-serif;\n text-align: center;\n color: #4E4E4E;\n}\n\nh1 {\n font-size: 32px;\n margin-bottom: 22px;\n}\n\nh1, h3 {\n font-weight: normal;\n}\n\nh3 {\n font-size: 19px;\n}\n\n#requestIdContainer {\n font-size: 19px;\n display: none;\n}</style><script src="/embeddedErrorPage.js?2020_2_150_ue2837ac2bm"></script></head></html><body><h1>The page you were looking for could not be found.</h1><h3>Check the URL for errors.</h3><p id="requestIdContainer"><span>Request ID</span> <span id="requestId"></span></p></body>'
感謝重播!
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.