pyowm.exceptions package

Submodules

pyowm.exceptions.api_call_error module

Module containing APICallError class

exception pyowm.exceptions.api_call_error.APICallError(message, triggering_error=None)[source]

Bases: pyowm.exceptions.OWMError

Error class that represents generic failures when invoking OWM web API, in example due to network errors.

Parameters:
  • message (str) – the message of the error
  • triggering_error (an Exception subtype) – optional Exception object that triggered this error (defaults to None)
exception pyowm.exceptions.api_call_error.BadGatewayError(message, triggering_error=None)[source]

Bases: pyowm.exceptions.api_call_error.APICallError

Error class that represents 502 errors - i.e when upstream backend cannot communicate with API gateways.

Parameters:
  • message (str) – the message of the error
  • triggering_error (an Exception subtype) – optional Exception object that triggered this error (defaults to None)

pyowm.exceptions.api_response_error module

Module containing APIResponseError class

exception pyowm.exceptions.api_response_error.APIResponseError(message)[source]

Bases: pyowm.exceptions.OWMError

Error class that represents HTTP error status codes in OWM web API responses.

Parameters:cause (str) – the message of the error
Returns:a APIResponseError instance

pyowm.exceptions.not_found_error module

Module containing NotFoundError class

exception pyowm.exceptions.not_found_error.NotFoundError(message)[source]

Bases: pyowm.exceptions.OWMError

Error class that represents the situation when an entity is not found into a collection of entities.

Parameters:cause (str) – the message of the error
Returns:a NotFoundError instance

pyowm.exceptions.parse_response_error module

Module containing ParseResponseError class

exception pyowm.exceptions.parse_response_error.ParseResponseError(message)[source]

Bases: pyowm.exceptions.OWMError

Error class that represents failures when parsing payload data in HTTP responses sent by the OWM web API.

Parameters:cause (str) – the message of the error
Returns:a ParseResponseError instance

pyowm.exceptions.unauthorized_error module

Module containing Unauthorized class

exception pyowm.exceptions.unauthorized_error.UnauthorizedError(message)[source]

Bases: pyowm.exceptions.OWMError

Error class that represents the situation when an entity cannot be retrieved due to user subscription unsufficient capabilities.

Parameters:cause (str) – the message of the error
Returns:a UnauthorizedError instance

Module contents

Module containing the OWMError class as base for all other OWM errors

exception pyowm.exceptions.OWMError[source]

Bases: exceptions.Exception