Closed
Description
Description
I built librdkafka and confluent-kafka-python from source to get Kerberos support in Python 3.6.4 both from the trunk in github.
When I attempt to run my simple producer script, I get the following error:
python /home/drake/kafka_web/producer_confluent.py
Traceback (most recent call last):
File "/home/drake/kafka_web/producer_confluent.py", line 2, in <module>
from confluent_kafka import Producer
File "/home/drake/anaconda3/lib/python3.6/site-packages/confluent_kafka-0.11.4-py3.6-linux-x86_64.egg/confluent_kafka/__init__.py", line 2, in <module>
from .cimpl import (Consumer, # noqa
ImportError: /home/drake/anaconda3/lib/python3.6/site-packages/confluent_kafka-0.11.4-py3.6-linux-x86_64.egg/confluent_kafka/cimpl.cpython-36m-x86_64-linux-gnu.so: undefined symbol: python /home/drake/kafka_web/producer_confluent.py
Traceback (most recent call last):
File "/home/drake/kafka_web/producer_confluent.py", line 2, in <module>
from confluent_kafka import Producer
File "/home/drake/anaconda3/lib/python3.6/site-packages/confluent_kafka-0.11.4-py3.6-linux-x86_64.egg/confluent_kafka/__init__.py", line 2, in <module>
from .cimpl import (Consumer, # noqa
ImportError: /home/drake/anaconda3/lib/python3.6/site-packages/confluent_kafka-0.11.4-py3.6-linux-x86_64.egg/confluent_kafka/cimpl.cpython-36m-x86_64-linux-gnu.so: undefined symbol: PyString_AsStringAndSize
The function PyString_AsStringAndSize
appears to be a Python2 API call, when this is running in a Python 3 environment.
How to reproduce
Install Anaconda Python 3.6
git clone confluent-kafka-python
setup.py build
setup.py install
Checklist
Please provide the following information:
- confluent-kafka-python and librdkafka version (
confluent_kafka.version()
andconfluent_kafka.libversion()
): - Apache Kafka broker version:
- Client configuration:
{...}
- Operating system: Ubuntu 4.15.0
- Provide client logs (with
'debug': '..'
as necessary) - Provide broker log excerpts
- Critical issue