Exceptions

  • TelegramAPIError
    • ValidationError

    • Throttled

    • BadRequest
      • MessageError
        • MessageNotModified

        • MessageToForwardNotFound

        • MessageToDeleteNotFound

        • MessageToPinNotFound

        • MessageIdentifierNotSpecified

        • MessageTextIsEmpty

        • MessageCantBeEdited

        • MessageCantBeDeleted

        • MessageToEditNotFound

        • MessageToReplyNotFound

        • ToMuchMessages

      • PollError
        • PollCantBeStopped

        • PollHasAlreadyClosed

        • PollsCantBeSentToPrivateChats

        • PollSizeError
          • PollMustHaveMoreOptions

          • PollCantHaveMoreOptions

          • PollsOptionsLengthTooLong

          • PollOptionsMustBeNonEmpty

          • PollQuestionMustBeNonEmpty

        • MessageWithPollNotFound (with MessageError)

        • MessageIsNotAPoll (with MessageError)

      • ObjectExpectedAsReplyMarkup

      • InlineKeyboardExpected

      • ChatNotFound

      • ChatDescriptionIsNotModified

      • InvalidQueryID

      • InvalidPeerID

      • InvalidHTTPUrlContent

      • ButtonURLInvalid

      • URLHostIsEmpty

      • StartParamInvalid

      • ButtonDataInvalid

      • WrongFileIdentifier

      • GroupDeactivated

      • BadWebhook
        • WebhookRequireHTTPS

        • BadWebhookPort

        • BadWebhookAddrInfo

        • BadWebhookNoAddressAssociatedWithHostname

      • NotFound
        • MethodNotKnown

      • PhotoAsInputFileRequired

      • InvalidStickersSet

      • NoStickerInRequest

      • ChatAdminRequired

      • NeedAdministratorRightsInTheChannel

      • MethodNotAvailableInPrivateChats

      • CantDemoteChatCreator

      • CantRestrictSelf

      • NotEnoughRightsToRestrict

      • PhotoDimensions

      • UnavailableMembers

      • TypeOfFileMismatch

      • WrongRemoteFileIdSpecified

      • PaymentProviderInvalid

      • CurrencyTotalAmountInvalid

      • CantParseUrl

      • UnsupportedUrlProtocol

      • CantParseEntities

      • ResultIdDuplicate

      • MethodIsNotAvailable

    • ConflictError
      • TerminatedByOtherGetUpdates

      • CantGetUpdates

    • Unauthorized
      • BotKicked

      • BotBlocked

      • UserDeactivated

      • CantInitiateConversation

      • CantTalkWithBots

    • NetworkError

    • RetryAfter

    • MigrateToChat

    • RestartingTelegram

  • AIOGramWarning
    • TimeoutWarning

exception aiogram.utils.exceptions.TelegramAPIError(message=None)[source]
exception aiogram.utils.exceptions.AIOGramWarning[source]
exception aiogram.utils.exceptions.TimeoutWarning[source]
exception aiogram.utils.exceptions.FSMStorageWarning[source]
exception aiogram.utils.exceptions.ValidationError(message=None)[source]
exception aiogram.utils.exceptions.BadRequest(message=None)[source]
exception aiogram.utils.exceptions.MessageError(message=None)[source]
exception aiogram.utils.exceptions.MessageNotModified(message=None)[source]

Will be raised when you try to set new text is equals to current text.

exception aiogram.utils.exceptions.MessageToForwardNotFound(message=None)[source]

Will be raised when you try to forward very old or deleted or unknown message.

exception aiogram.utils.exceptions.MessageToDeleteNotFound(message=None)[source]

Will be raised when you try to delete very old or deleted or unknown message.

exception aiogram.utils.exceptions.MessageToPinNotFound(message=None)[source]

Will be raised when you try to pin deleted or unknown message.

exception aiogram.utils.exceptions.MessageToReplyNotFound(message=None)[source]

Will be raised when you try to reply to very old or deleted or unknown message.

exception aiogram.utils.exceptions.MessageIdentifierNotSpecified(message=None)[source]
exception aiogram.utils.exceptions.MessageTextIsEmpty(message=None)[source]
exception aiogram.utils.exceptions.MessageCantBeEdited(message=None)[source]
exception aiogram.utils.exceptions.MessageCantBeDeleted(message=None)[source]
exception aiogram.utils.exceptions.MessageToEditNotFound(message=None)[source]
exception aiogram.utils.exceptions.MessageIsTooLong(message=None)[source]
exception aiogram.utils.exceptions.ToMuchMessages(message=None)[source]

Will be raised when you try to send media group with more than 10 items.

exception aiogram.utils.exceptions.ObjectExpectedAsReplyMarkup(message=None)[source]
exception aiogram.utils.exceptions.InlineKeyboardExpected(message=None)[source]
exception aiogram.utils.exceptions.PollError(message=None)[source]
exception aiogram.utils.exceptions.PollCantBeStopped(message=None)[source]
exception aiogram.utils.exceptions.PollHasAlreadyBeenClosed(message=None)[source]
exception aiogram.utils.exceptions.PollsCantBeSentToPrivateChats(message=None)[source]
exception aiogram.utils.exceptions.PollSizeError(message=None)[source]
exception aiogram.utils.exceptions.PollMustHaveMoreOptions(message=None)[source]
exception aiogram.utils.exceptions.PollCantHaveMoreOptions(message=None)[source]
exception aiogram.utils.exceptions.PollOptionsMustBeNonEmpty(message=None)[source]
exception aiogram.utils.exceptions.PollQuestionMustBeNonEmpty(message=None)[source]
exception aiogram.utils.exceptions.PollOptionsLengthTooLong(message=None)[source]
exception aiogram.utils.exceptions.PollQuestionLengthTooLong(message=None)[source]
exception aiogram.utils.exceptions.PollCanBeRequestedInPrivateChatsOnly(message=None)[source]
exception aiogram.utils.exceptions.MessageWithPollNotFound(message=None)[source]

Will be raised when you try to stop poll with message without poll

exception aiogram.utils.exceptions.MessageIsNotAPoll(message=None)[source]

Will be raised when you try to stop poll with message without poll

exception aiogram.utils.exceptions.ChatNotFound(message=None)[source]
exception aiogram.utils.exceptions.ChatIdIsEmpty(message=None)[source]
exception aiogram.utils.exceptions.InvalidUserId(message=None)[source]
exception aiogram.utils.exceptions.ChatDescriptionIsNotModified(message=None)[source]
exception aiogram.utils.exceptions.InvalidQueryID(message=None)[source]
exception aiogram.utils.exceptions.InvalidPeerID(message=None)[source]
exception aiogram.utils.exceptions.InvalidHTTPUrlContent(message=None)[source]
exception aiogram.utils.exceptions.ButtonURLInvalid(message=None)[source]
exception aiogram.utils.exceptions.URLHostIsEmpty(message=None)[source]
exception aiogram.utils.exceptions.StartParamInvalid(message=None)[source]
exception aiogram.utils.exceptions.ButtonDataInvalid(message=None)[source]
exception aiogram.utils.exceptions.WrongFileIdentifier(message=None)[source]
exception aiogram.utils.exceptions.GroupDeactivated(message=None)[source]
exception aiogram.utils.exceptions.PhotoAsInputFileRequired(message=None)[source]

Will be raised when you try to set chat photo from file ID.

exception aiogram.utils.exceptions.InvalidStickersSet(message=None)[source]
exception aiogram.utils.exceptions.NoStickerInRequest(message=None)[source]
exception aiogram.utils.exceptions.ChatAdminRequired(message=None)[source]
exception aiogram.utils.exceptions.NeedAdministratorRightsInTheChannel(message=None)[source]
exception aiogram.utils.exceptions.NotEnoughRightsToPinMessage(message=None)[source]
exception aiogram.utils.exceptions.MethodNotAvailableInPrivateChats(message=None)[source]
exception aiogram.utils.exceptions.CantDemoteChatCreator(message=None)[source]
exception aiogram.utils.exceptions.CantRestrictSelf(message=None)[source]
exception aiogram.utils.exceptions.NotEnoughRightsToRestrict(message=None)[source]
exception aiogram.utils.exceptions.PhotoDimensions(message=None)[source]
exception aiogram.utils.exceptions.UnavailableMembers(message=None)[source]
exception aiogram.utils.exceptions.TypeOfFileMismatch(message=None)[source]
exception aiogram.utils.exceptions.WrongRemoteFileIdSpecified(message=None)[source]
exception aiogram.utils.exceptions.PaymentProviderInvalid(message=None)[source]
exception aiogram.utils.exceptions.CurrencyTotalAmountInvalid(message=None)[source]
exception aiogram.utils.exceptions.BadWebhook(message=None)[source]
exception aiogram.utils.exceptions.WebhookRequireHTTPS(message=None)[source]
exception aiogram.utils.exceptions.BadWebhookPort(message=None)[source]
exception aiogram.utils.exceptions.BadWebhookAddrInfo(message=None)[source]
exception aiogram.utils.exceptions.BadWebhookNoAddressAssociatedWithHostname(message=None)[source]
exception aiogram.utils.exceptions.CantParseUrl(message=None)[source]
exception aiogram.utils.exceptions.UnsupportedUrlProtocol(message=None)[source]
exception aiogram.utils.exceptions.CantParseEntities(message=None)[source]
exception aiogram.utils.exceptions.ResultIdDuplicate(message=None)[source]
exception aiogram.utils.exceptions.BotDomainInvalid(message=None)[source]
exception aiogram.utils.exceptions.MethodIsNotAvailable(message=None)[source]
exception aiogram.utils.exceptions.NotFound(message=None)[source]
exception aiogram.utils.exceptions.MethodNotKnown(message=None)[source]
exception aiogram.utils.exceptions.ConflictError(message=None)[source]
exception aiogram.utils.exceptions.TerminatedByOtherGetUpdates(message=None)[source]
exception aiogram.utils.exceptions.CantGetUpdates(message=None)[source]
exception aiogram.utils.exceptions.Unauthorized(message=None)[source]
exception aiogram.utils.exceptions.BotKicked(message=None)[source]
exception aiogram.utils.exceptions.BotBlocked(message=None)[source]
exception aiogram.utils.exceptions.UserDeactivated(message=None)[source]
exception aiogram.utils.exceptions.CantInitiateConversation(message=None)[source]
exception aiogram.utils.exceptions.CantTalkWithBots(message=None)[source]
exception aiogram.utils.exceptions.NetworkError(message=None)[source]
exception aiogram.utils.exceptions.RestartingTelegram[source]
exception aiogram.utils.exceptions.RetryAfter(retry_after)[source]
exception aiogram.utils.exceptions.MigrateToChat(chat_id)[source]
exception aiogram.utils.exceptions.Throttled(**kwargs)[source]