This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: urllib.request.urlopen dies on non-basic/digest auth schemes
Type: Stage:
Components: Library (Lib) Versions: Python 3.4, Python 3.5
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: cvrebert, orsenthil, samwyse
Priority: normal Keywords:

Created on 2014-05-01 23:03 by samwyse, last changed 2022-04-11 14:58 by admin.

Messages (1)
msg217734 - (view) Author: Samwyse (samwyse) * Date: 2014-05-01 23:03
In Python 2.x, this opens an NTLM protected URL:
    opener = urllib2.build_opener(proxy_handler, auth_NTLM, auth_digest, auth_basic)
    urllib2.install_opener(opener)
    response = urllib2.urlopen(url)

In Python 3.x, this raises an error:
    opener = urllib.request.build_opener(proxy_handler, auth_NTLM, auth_digest, auth_basic)
    urllib.request.install_opener(opener)
    response = urllib.request.urlopen(url)

The error is:
ValueError: AbstractDigestAuthHandler does not support the following scheme: 'NTLM'

Removing auth_digest from the list of handlers allows the code to work.
History
Date User Action Args
2022-04-11 14:58:03adminsetgithub: 65612
2014-05-02 18:09:58ned.deilysetnosy: + orsenthil

versions: - Python 3.1, Python 3.2, Python 3.3
2014-05-02 16:43:31cvrebertsetnosy: + cvrebert
2014-05-01 23:03:33samwysecreate