Forum Discussion
Connar_Rosebrau
Nimbostratus
Jul 03, 2013"basic auth failed" when creating a simple connection
Hello,
When I run the code at the following link from the command line (ie. "python example.py") I get the exception "suds.transport.TransportError: HTTP Error 401: basic auth failed"
What makes this so bizarre is that if I set up this same BIGIP instance in the interpreter, it works just fine. So I am unable to run this from a script. What is making this happen? How do I solve this?
Thanks
2 Replies
- L4L7_53191
Nimbostratus
I remember running into this way back - there was some issue with the urllib2 library and an older python (2.6 if I recall). Are you sure you're using the same interpreter both for your shell and your script? - Connar_Rosebrau
Nimbostratus
L4L7,
I am running Python 2.7.3 as the interpreter. Is there a way to tell which version of python is running scripts? I had a simple script that was simply "import sys; print sys.version_info" and when that was run using "python version.py" it said the version was 2.7.3 as well.
The interpreter may be running a different version of urllib2, but that's another thing that I don't know how to check. I will return with the answer for that.edit:
urllib2 is version 2.7 in both cases. what else could be causing this?
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
