首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法使用Tableau Server客户端(TSC-Python)连接到Tableau Server

无法使用Tableau Server客户端(TSC-Python)连接到Tableau Server
EN

Stack Overflow用户
提问于 2020-07-29 19:33:50
回答 1查看 206关注 0票数 1

我的脚本(我没有使用saml进行身份验证):

代码语言:javascript
复制
import tableauserverclient as TSC


tableau_auth = TSC.TableauAuth('myusername', 'mypassword', site_id='sitename')

server = TSC.Server('tableauserverurl')

server.auth.sign_in(tableau_auth)

错误:

代码语言:javascript
复制
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>&nbsp;<span id="requestId"></span></p></body>'

感谢回放!

EN

回答 1

Stack Overflow用户

发布于 2021-04-21 21:13:23

现在实现了Personal access tokens,并可以将其用作具有此问题的用户的替代身份验证策略。

在相关的github问题上归功于this comment

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/63152673

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档