splunk-sdk-python icon indicating copy to clipboard operation
splunk-sdk-python copied to clipboard

xml.etree.ElementTree.ParseError: syntax error: line 1, column 0

Open shanmathi1422 opened this issue 6 years ago • 4 comments

Hi, I am trying to use export.py from examples directory, to extract data from splunk from particular index. But i am facing the below error, Traceback (most recent call last): File "export.py", line 355, in main() File "export.py", line 330, in main service = connect(**options.kwargs) File "../../splunklib/binding.py", line 1007, in connect c.login() File "../../splunklib/binding.py", line 886, in login session = XML(body).findtext("./sessionKey") File "*/python3.7/xml/etree/ElementTree.py", line 1315, in XML parser.feed(text) xml.etree.ElementTree.ParseError: syntax error: line 1, column 0

Python version used: 3.7 Splunk version used: 8.0.4

Kindly do the needful.

shanmathi1422 avatar Jul 09 '20 10:07 shanmathi1422

I'm getting the same error as well when trying to login.

rhblind avatar Nov 30 '20 12:11 rhblind

Hi @shanmathi1422 and @rhblind , could you please verify which port and scheme are being set in the .splunkrc file. The connect service works properly when port = 8089 and scheme=https. Please try using the port = 8089 and scheme=https setting in .splunkrc file and let us know if you still face the error

akaila-splunk avatar Nov 24 '21 13:11 akaila-splunk

I'm not using this SDK anymore as it has some other issues we were unable to work around. So I don't have it running any more, sorry =/

rhblind avatar Nov 24 '21 13:11 rhblind

@shanmathi1422 Closing this issue due to no response on it. Please reopen if this is still an issue.

ashah-splunk avatar Dec 14 '21 14:12 ashah-splunk