Skip to content

TypeError: an integer is required(got type cimpl.KafkaError) #871

@demougin2u

Description

@demougin2u

Description

Consumer poll method raise a TypeError instead of KafkaError when broker is down

How to reproduce

Traceback (most recent call last):
  File "avro_consumer.py", line 126, in <module>
    main(parser.parse_args())
  File "avro_consumer.py", line 96, in main
    msg = consumer.poll(1.0)
  File "/home/ddemougin/.local/lib/python3.7/site-packages/confluent_kafka/deserializing_consumer.py", line 131, in poll
    raise ConsumeError(msg.error(), message=msg)
  File "/home/ddemougin/.local/lib/python3.7/site-packages/confluent_kafka/error.py", line 44, in __init__
    kafka_error = KafkaError(error_code)
TypeError: an integer is required (got type cimpl.KafkaError)

Checklist

Please provide the following information:

  • confluent-kafka-python and librdkafka version (confluent_kafka.version() and confluent_kafka.libversion()):
    confluent-kafka-python version : ('1.4.1', 17039616) and librdkafka version : ('1.4.0', 17039615)
  • Apache Kafka broker version:
    5.1.4, run as confluentinc/cp-kafka:5.1.4 docker container.
  • Client configuration: {...}
  • Operating system:
    debian 10.4
  • Provide client logs (with 'debug': '..' as necessary) :
Traceback (most recent call last):
  File "avro_consumer.py", line 126, in <module>
    main(parser.parse_args())
  File "avro_consumer.py", line 96, in main
    msg = consumer.poll(1.0)
  File "/home/ddemougin/.local/lib/python3.7/site-packages/confluent_kafka/deserializing_consumer.py", line 131, in poll
    raise ConsumeError(msg.error(), message=msg)
  File "/home/ddemougin/.local/lib/python3.7/site-packages/confluent_kafka/error.py", line 44, in __init__
    kafka_error = KafkaError(error_code)
TypeError: an integer is required (got type cimpl.KafkaError)
  • Provide broker log excerpts
  • Critical issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy