I have a python UI using tkinter which is getting the credentials of splunk and the index in textboxes and
Then in backend executes code and collects some json data from switches.The trying to upload to splunk using the code below
spindex = user_args["splunk_index"]
myindex = service.indexes[spindex ]
myindex.upload(uploadfile) #this uploadfile is a json file which is being uploaded
from UI i passed to textbox as 'indexone'
I am getting keyError: UrlEncoded('indexone') while above lines are executed
But if I directly write
myindex = service.indexes['indexone']
But i need to pass the index provided on the UI.
How to get rid of this KeyError?