errors#
- exception analytix.errors.AnalytixError#
The base exception class for analytix.
- exception analytix.errors.MissingOptionalComponents(*args: str)#
Exception thrown when components not installed by analytix by default are required for a specific operation, but are not installed.
- Parameters
*args – The libraries that need to be installed.
- exception analytix.errors.APIError(code: str, message: str)#
Exception thrown when the YouTube Analytics API throws an error.
- Parameters
code – The error code.
message – The error message.
- exception analytix.errors.AuthenticationError(error: str, error_description: str)#
Exception thrown when something goes wrong during the OAuth authentication process.
- Parameters
error – The error type.
error_description – A description of the error.
- exception analytix.errors.DataFrameConversionError#
Exception thrown when converting a report to a DataFrame fails.
- exception analytix.errors.InvalidRequest#
Exception thrown when a request to be made to the YouTube Analytics API is not valid.
- exception analytix.errors.MissingMetrics#
Exception thrown when no metrics are provided. Inherits from
InvalidRequest
.
- exception analytix.errors.InvalidMetrics(diff: set[str])#
Exception thrown when one or more metrics are not valid. Inherits from
InvalidRequest
.- Parameters
diff – The invalid metrics.
- exception analytix.errors.UnsupportedMetrics(diff: set[str])#
Exception thrown when one or more metrics are valid, but not compatible with the report type that has been selected. Inherits from
InvalidRequest
.- Parameters
diff – The unsupported metrics.
- exception analytix.errors.MissingSortOptions#
Exception thrown when no sort options are provided when necessary. Inherits from
InvalidRequest
.
- exception analytix.errors.InvalidSortOptions(diff: set[str])#
Exception thrown when one or more sort options are not valid. Inherits from
InvalidRequest
.- Parameters
diff – The invalid sort options.
- exception analytix.errors.UnsupportedSortOptions(diff: set[str], *, descending_only: bool = False)#
Exception thrown when one or more sort options are valid, but not compatible with the report type that has been selected. Inherits from
InvalidRequest
.- Parameters
diff – The unsupported sort options.
- Keyword Arguments
descending_only – Whether only descending sort options were expected. Defaults to
False
.
- exception analytix.errors.InvalidDimensions(diff: set[str], depr: set[str])#
Exception thrown when one or more dimensions are not valid. Inherits from
InvalidRequest
.- Parameters
diff – The invalid dimensions.
depr – Dimensions that are deprecated (this will only ever be “7DayTotals” and “30DayTotals”).
- exception analytix.errors.UnsupportedDimensions(diff: set[str])#
Exception thrown when one or more dimensions are valid, but not compatible with the report type that has been selected. Inherits from
InvalidRequest
.- Parameters
diff – The unsupported dimensions.
- exception analytix.errors.InvalidSetOfDimensions(expd: str, recv: int, values: set[str])#
Exception thrown when a set of dimensions contravenes the API specification. Inherits from
InvalidRequest
.- Parameters
expd – The number of dimensions expected from the given set.
recv – The number of dimensions received from the given set.
values – The full set of possible dimensions in this context.
- exception analytix.errors.InvalidFilters(diff: set[str])#
Exception thrown when one or more filters are not valid. Inherits from
InvalidRequest
.- Parameters
diff – The invalid filters.
- exception analytix.errors.UnsupportedFilters(diff: set[str])#
Exception thrown when one or more filters are valid, but not compatible with the report type that has been selected. Inherits from
InvalidRequest
.- Parameters
diff – The unsupported filters.
- exception analytix.errors.InvalidSetOfFilters(expd: str, recv: int, values: set[str])#
Exception thrown when a set of filters contravenes the API specification. Inherits from
InvalidRequest
.- Parameters
expd – The number of filters expected from the given set.
recv – The number of filters received from the given set.
values – The full set of possible filters in this context.
- exception analytix.errors.InvalidFilterValue(key: str, value: str)#
Exception thrown when an invalid value is provided for a filter. Inherits from
InvalidRequest
.- Parameters
key – The filter key.
value – The invalid filter value.
- exception analytix.errors.UnsupportedFilterValue(key: str, value: str)#
Exception thrown when a valid value is provided for a filter, but cannot be used for the report type that has been selected. Inherits from
InvalidRequest
.- Parameters
key – The filter key.
value – The unsupported filter value.
- exception analytix.errors.InvalidAmountOfResults(actual: int, maximum: int)#
Exception thrown when the provided maximum number of results is not valid. Inherits from
InvalidRequest
.- Parameters
actual – The input value from the user.
maximum – The maximum allowed value.