Errors

A representation for the different error codes provided by the API

exception openweatherwrap.errors.InvalidAPIKeyError(message='The API key provided is invalid (HTTP 401).')

Bases: OpenWeatherMapException

Raised when the API key provided is invalid (HTTP 401)

exception openweatherwrap.errors.NotFoundError(message='The location provided is invalid, or the request format is wrong (HTTP 404).')

Bases: OpenWeatherMapException

Raised when the location provided is invalid, or if the format of the request is wrong (HTTP 404)

exception openweatherwrap.errors.OpenWeatherMapException(message='An error occurred with the OpenWeatherMap API.')

Bases: Exception

Base class for all OpenWeatherMap exceptions.

exception openweatherwrap.errors.SubscriptionLevelError(message='Requested data is not available under the current subscription plan (HTTP 400000).')

Bases: OpenWeatherMapException

Raised when requested data is not available under the current subscription plan (HTTP 400000).

exception openweatherwrap.errors.TooManyRequestsError(message='Too many requests for the subscription (HTTP 429).')

Bases: OpenWeatherMapException

Raised when there are too many requests for the subscription (HTTP 429)