bryanthowell-tableau / tableau_tools

Package containing Tableau REST API, XML modification, tabcmd and repository tools
Other
215 stars 86 forks source link

UnicodeDecodeError #9

Closed Kun2210 closed 7 years ago

Kun2210 commented 7 years ago

I'm getting the well known from previous versions - UnicodeDecodeError. This happens exactly the same as was in: https://github.com/bryantbhowell/tableau_rest_api/issues/9

all my files are UTF-8 encoded, I'm using the latest version of Tableau Tools.

Traceback (most recent call last): File "D:\Apache\Apache_2.2_32\Apache22\htdocs\CoMeT\python\getWorkbookList.py" , line 30, in <module> tab_srv.signin() File "C:\Python27\lib\tableau_tools\tableau_rest_api\tableau_rest_api_connecti on.py", line 215, in signin api.request_from_api(0) File "C:\Python27\lib\tableau_tools\tableau_rest_api\rest_xml_request.py", lin e 195, in request_from_api self.__make_request(page_number) File "C:\Python27\lib\tableau_tools\tableau_rest_api\rest_xml_request.py", lin e 140, in __make_request unicode_raw_response = parser.unescape(initial_response) File "C:\Python27\lib\HTMLParser.py", line 475, in unescape return re.sub(r"&(#?[xX]?(?:[0-9a-fA-F]+|\w{1,8}));", replaceEntities, s) File "C:\Python27\lib\re.py", line 155, in sub return _compile(pattern, flags).sub(repl, string, count) UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 674: ordina l not in range(128)

Any ideas?

EDIT: Adding log file:

`---------- signin started at 2017-07-03 03:41:34 ---------- 2017-07-03 03:41:34 : Trying version 10.0 2017-07-03 03:41:34 : Logging in via: https://tab.cert.sabre.com/api/2.3/auth/signin 2017-07-03 03:41:34 : Login payload is

2017-07-03 03:41:34 : HTTP verb is post 2017-07-03 03:41:34 : Making REST request to Tableau Server using post 2017-07-03 03:41:34 : Request URI: https://tab.cert.sabre.com/api/2.3/auth/signin 2017-07-03 03:41:34 : Request XML:

2017-07-03 03:41:35 : Content type from headers: text/html;charset=UTF-8 `

Kun2210 commented 7 years ago

This was happening due to misconfiguration in my app, sorry.