Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when logging in getting xml.parsers.expat.ExpatError: must not undeclare prefix: line 2, column 0 #204

Closed
ejoynes opened this issue Nov 30, 2022 · 5 comments
Labels
2.0.11 bug Something isn't working fixed

Comments

@ejoynes
Copy link

ejoynes commented Nov 30, 2022

I think this is the same issue as closed issue #156

INFO: Creating new session
INFO: must not undeclare prefix: line 2, column 0
Traceback (most recent call last):
File "C:\Users\f404632.conda\envs\sp\lib\xml\etree\ElementTree.py", line 1722, in feed
self.parser.Parse(data, False)
xml.parsers.expat.ExpatError: must not undeclare prefix: line 2, column 0

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\f404632.conda\envs\sp\lib\site-packages\src\execution\tabcmd_controller.py", line 43, in run
namespace.func.run_command(namespace)
File "C:\Users\f404632.conda\envs\sp\lib\site-packages\src\commands\auth\login_command.py", line 25, in run_command
session.create_session(args)
File "C:\Users\f404632.conda\envs\sp\lib\site-packages\src\commands\auth\session.py", line 237, in create_session
self._create_new_connection()
File "C:\Users\f404632.conda\envs\sp\lib\site-packages\src\commands\auth\session.py", line 141, in _create_new_connection
self.tableau_server = self._set_connection_options()
File "C:\Users\f404632.conda\envs\sp\lib\site-packages\src\commands\auth\session.py", line 135, in _set_connection_options
tableau_server = TSC.Server(self.server_url, use_server_version=True, http_options=http_options)
File "C:\Users\f404632.conda\envs\sp\lib\site-packages\tableauserverclient\server\server.py", line 97, in init
self.use_server_version()
File "C:\Users\f404632.conda\envs\sp\lib\site-packages\tableauserverclient\server\server.py", line 139, in use_server_version
self.version = self._determine_highest_version()
File "C:\Users\f404632.conda\envs\sp\lib\site-packages\tableauserverclient\server\server.py", line 129, in _determine_highest_version
version = self.server_info.get().rest_api_version
File "C:\Users\f404632.conda\envs\sp\lib\site-packages\tableauserverclient\server\endpoint\endpoint.py", line 186, in wrapper
return func(self, *args, **kwargs)
File "C:\Users\f404632.conda\envs\sp\lib\site-packages\tableauserverclient\server\endpoint\server_info_endpoint.py", line 30, in get
server_info = ServerInfoItem.from_response(server_response.content, self.parent_srv.namespace)
File "C:\Users\f404632.conda\envs\sp\lib\site-packages\tableauserverclient\models\server_info_item.py", line 35, in from_response
parsed_response = fromstring(resp)
File "C:\Users\f404632.conda\envs\sp\lib\site-packages\defusedxml\common.py", line 126, in fromstring
parser.feed(text)
File "C:\Users\f404632.conda\envs\sp\lib\xml\etree\ElementTree.py", line 1724, in feed
self._raiseerror(v)
File "C:\Users\f404632.conda\envs\sp\lib\xml\etree\ElementTree.py", line 1631, in _raiseerror
raise err
xml.etree.ElementTree.ParseError: must not undeclare prefix: line 2, column 0

@ejoynes
Copy link
Author

ejoynes commented Nov 30, 2022

Tableau Server Version: 2021.4.3 (20214.22.0108.1039) 64-bit Windows
tableauserverclient==0.19
tabcmd==2.0.5

@jacalata
Copy link
Contributor

Could you try downloading the newest version of tabcmd? It should be 2.0.7.

@illonage illonage added the 2.0.7 label Dec 1, 2022
@jacalata
Copy link
Contributor

I think this error means you are getting a non-xml response, which usually points to a problem in your request. Can you share the command line you used? (make sure to remove any passwords or information that shouldn't be public).

@jacalata
Copy link
Contributor

I've identified this in the underlying tsc library, and it will be fixed in the next release of that.

@jacalata
Copy link
Contributor

This is fixed in the february release, 2.0.11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.0.11 bug Something isn't working fixed
Projects
None yet
Development

No branches or pull requests

3 participants