Re: urllib2 auth error

2006-02-20 Thread rtilley
rtilley wrote: > I have the right username and password. I may be using the above code > wrong. Any tips? I had the _wrong_ password... Sorry. -- http://mail.python.org/mailman/listinfo/python-list

urllib2 auth error

2006-02-20 Thread rtilley
I get this error: HTTP Error 401: Authorization Required When I do this: try: handler = urllib2.HTTPBasicAuthHandler() handler.add_password('realm', 'website', 'user', 'pass') opener = urllib2.build_opener(handler) urllib2.install_opener(opener) f = urllib2.urlopen('http