ID EN
Urllib Request

error

Python 3.11

Handle an error of the given protocol. This will call the registered error handlers for the given protocol with the given arguments (which are protocol specific). The HTTP protocol is a special case which uses the HTTP response code to determine the specific error handler; refer to the http_error_() methods of the handler classes.

Syntax

PYTHON
OpenerDirector.error(proto, *args)

See Also

urlopen()