# Exceptions

Pika specific exceptions

exception pika.exceptions.AMQPChannelError

exception pika.exceptions.AMQPConnectionError

exception pika.exceptions.AMQPError

exception pika.exceptions.AMQPHeartbeatTimeout

  Connection was dropped as result of heartbeat timeout.

exception pika.exceptions.AuthenticationError

exception pika.exceptions.BodyTooLongError

exception pika.exceptions.ChannelClosed(reply_code: int, reply_text: str)

  The channel closed by client or by broker

  property reply_code

    NEW in v1.0.0 :rtype: int

  property reply_text

    NEW in v1.0.0 :rtype: str

exception pika.exceptions.ChannelClosedByBroker(reply_code: int, reply_text: str)

  Channel.Close from broker; may be passed as reason to channel’s on-closed callback of non-blocking connection adapters or raised by BlockingConnection.

  NEW in v1.0.0

exception pika.exceptions.ChannelClosedByClient(reply_code: int, reply_text: str)

  Channel closed by client upon receipt of Channel.CloseOk; may be passed as reason to channel’s on-closed callback of non-blocking connection adapters, but not raised by BlockingConnection.

  NEW in v1.0.0

exception pika.exceptions.ChannelError

exception pika.exceptions.ChannelWrongStateError

  Channel is in wrong state for the requested operation.

exception pika.exceptions.ConnectionBlockedTimeout

  RabbitMQ-specific: timed out waiting for connection.unblocked.

exception pika.exceptions.ConnectionClosed(reply_code: int, reply_text: str)
  property reply_code: int

    NEW in v1.0.0 :rtype: int

  property reply_text: str

    NEW in v1.0.0 :rtype: str

exception pika.exceptions.ConnectionClosedByBroker(reply_code: int, reply_text: str)

  Connection.Close from broker.

exception pika.exceptions.ConnectionClosedByClient(reply_code: int, reply_text: str)

  Connection was closed at request of Pika client.

exception pika.exceptions.ConnectionOpenAborted

  Client closed connection while opening.

exception pika.exceptions.ConnectionWrongStateError

  Connection is in wrong state for the requested operation.

exception pika.exceptions.ConsumerCancelled

exception pika.exceptions.DuplicateConsumerTag

exception pika.exceptions.DuplicateGetOkCallback

exception pika.exceptions.IncompatibleProtocolError

exception pika.exceptions.InvalidChannelNumber

exception pika.exceptions.InvalidFieldTypeException

exception pika.exceptions.InvalidFrameError

exception pika.exceptions.MethodNotImplemented

exception pika.exceptions.NackError(messages: Sequence[ReturnedMessage])

  This exception is raised when a message published in publisher-acknowledgements mode is Nack’ed by the broker.

  Used by BlockingChannel.

exception pika.exceptions.NoFreeChannels

exception pika.exceptions.ProbableAccessDeniedError

exception pika.exceptions.ProbableAuthenticationError

exception pika.exceptions.ProtocolSyntaxError

exception pika.exceptions.ProtocolVersionMismatch

exception pika.exceptions.ReentrancyError

  The requested operation would result in unsupported recursion or reentrancy.

  Used by BlockingConnection/BlockingChannel

exception pika.exceptions.ShortStringTooLong

exception pika.exceptions.StreamLostError

  Stream (TCP) connection lost.

exception pika.exceptions.UnexpectedFrameError

exception pika.exceptions.UnroutableError(messages: Sequence[ReturnedMessage])

  Exception containing one or more unroutable messages returned by broker via Basic.Return.

  Used by BlockingChannel.

  In publisher-acknowledgements mode, this is raised upon receipt of Basic.Ack from broker; in the event of Basic.Nack from broker, NackError is raised instead

exception pika.exceptions.UnsupportedAMQPFieldException