Working on using the python rest api example, I get an error on step 3
myhttp.add_credentials(username, password)
servicessearchstatusstr = '/services/search/jobs/%s/' % sid
For this step, I have defined the password above and have used for a curl syntax and it works.
But when I run the code, it will always return an Unauthorized response.
I tried changing password to 'actualpass'
eg.
myhttp.add_credentials(username, 'actual pass')
...and it runs.
i also tried printing the variable password above that line and it stills shows me the correct password.
I went one step further and tested with another variable above it
eg.
pwd = 'actual pass'
myhttp.add_credentials(username, pwd)
and it works.
if I write
eg.
pwd = password
myhttp.add_credentials(username, password)
it does not run.
I apologise if this has been covered before, but I have searched and searched but to no avail.
I am just starting out but I hope to learn more.
Regards,
Eugene
... View more