Vous devez avoir un compte Developpez.com et être connecté pour pouvoir participer aux discussions.

Identifiez-vous
Identifiant
Mot de passe
Mot de passe oublié ?
Créer un compte

Vous n'avez pas encore de compte Developpez.com ? L'inscription est gratuite et ne vous prendra que quelques instants !

Je m'inscris !

Developpez.com

Python

Choisissez la catégorie, puis la rubrique :

urllib.error — Exception classes raised by urllib.request — Python v3.0 documentation

urllib.error — Exception classes raised by urllib.request¶

The urllib.error module defines the exception classes for exceptions raised by urllib.request. The base exception class is URLError, which inherits from IOError.

The following exceptions are raised by urllib.error as appropriate:

exception urllib.error.URLError¶

The handlers raise this exception (or derived exceptions) when they run into a problem. It is a subclass of IOError.

reason¶
The reason for this error. It can be a message string or another exception instance (socket.error for remote URLs, OSError for local URLs).
exception urllib.error.HTTPError¶

Though being an exception (a subclass of URLError), an HTTPError can also function as a non-exceptional file-like return value (the same thing that urlopen() returns). This is useful when handling exotic HTTP errors, such as requests for authentication.

code¶
An HTTP status code as defined in RFC 2616. This numeric value corresponds to a value found in the dictionary of codes as found in http.server.BaseHTTPRequestHandler.responses.
exception urllib.error.ContentTooShortError(msg[, content])¶
This exception is raised when the urlretrieve() function detects that the amount of the downloaded data is less than the expected amount (given by the Content-Length header). The content attribute stores the downloaded (and supposedly truncated) data.
Contacter le responsable de la rubrique Python

Partenaire : Hébergement Web