Skip to content

KafkaError thrown when setting error_cb: Property "error_cb" must be set through dedicated .._set_..() function #26

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
brmc opened this issue Aug 8, 2016 · 3 comments

Comments

@brmc
Copy link

brmc commented Aug 8, 2016

After updating confluent_kafka to master, I'm getting an error when setting error_cb:

cimpl.KafkaException: KafkaError{code=_INVALID_ARG,val=-186,str="Property "error_cb" must be set through dedicated .._set_..() function"}

I'm using a basic config:

config = {
        "bootstrap.servers": self.kafka_hosts,
        "error_cb": self.dump_data_on_failure,
        "socket.keepalive.enable": True
    }
    self.producer = Producer(**config)

I installed confluent_kafka directly from the error_cb branch a week or two ago, and it worked as expected, but after upgrading this morning, im getting this error. I still have the previous version installed in a virtualenv and it works, and from looking at the tests, I thought I was doing everything right. Can anyone see what I'm doing wrong?

@edenhill
Copy link
Contributor

edenhill commented Aug 8, 2016

Make sure the new master version is properly installed.
E.g., python setup.py install -f

@brmc
Copy link
Author

brmc commented Aug 8, 2016

Thanks for such a prompt response!

unfortunately I'm still getting the same error after cloning master and installing as recommended. To be sure I uninstalled the other version beforehand. Any ideas?

@brmc
Copy link
Author

brmc commented Aug 8, 2016

Oh. wait. it was an id10t error. I was executing the script from the command line

./kafka.py

so the system installation of python was being used rather than the virtualenv installation

sorry for wasting your time, but thanks anyway for your assistance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants