errors
Exception classes for analytix.
APIError
Bases: AnalytixError
The YouTube Analytics API has returned an error.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
code |
Union[str, int]
|
The error code. |
required |
message |
str
|
The error message. |
required |
Source code in analytix/errors.py
AnalytixError
AuthorisationError
Bases: AnalytixError
Something's gone wrong during the authorisation process.
BadRequest
Bases: APIError
The YouTube Analytics API has returned a 400 status.
This only happens when analytix has failed to catch an invalid request. If you see an error like this, report it!
Parameters:
Name | Type | Description | Default |
---|---|---|---|
code |
Union[str, int]
|
The error code. |
required |
message |
str
|
The error message. |
required |
Source code in analytix/errors.py
DataFrameConversionError
Bases: AnalytixError
Your report could not be converted to a DataFrame or table.
Forbidden
Bases: APIError
The YouTube Analytics API has returned a 403 status.
This is raised when you attempt to access monetary data from a non-partnered channel.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
code |
Union[str, int]
|
The error code. |
required |
message |
str
|
The error message. |
required |
Source code in analytix/errors.py
IdTokenError
Bases: AuthorisationError
Your ID token could not be token.
InvalidRequest
Bases: AnalytixError
analytix has found a problem in the request you tried to make to the YouTube Analytics API.
Source code in analytix/errors.py
MissingOptionalComponents
Bases: AnalytixError
Components not installed by analytix by default are required for a specific operation, but are not installed.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
*args |
str
|
The libraries that need to be installed. |
()
|
Source code in analytix/errors.py
NotAuthorised
Bases: AuthorisationError
The client does not have sufficient authorisation to complete the requested operation.
NotFound
Bases: APIError
The YouTube Analytics API has returned a 404 status.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
code |
Union[str, int]
|
The error code. |
required |
message |
str
|
The error message. |
required |
Source code in analytix/errors.py
RefreshTokenExpired
Bases: AuthorisationError
Your refresh token has expired.
Unauthorised
Bases: APIError
The YouTube Analytics API has returned a 401 status.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
code |
Union[str, int]
|
The error code. |
required |
message |
str
|
The error message. |
required |