Skip to content
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

KafkaError.str() fails if trying to produce binary data #199

Closed
jackandrews opened this issue May 30, 2017 · 2 comments
Closed

KafkaError.str() fails if trying to produce binary data #199

jackandrews opened this issue May 30, 2017 · 2 comments

Comments

@jackandrews
Copy link

Hi,

We are publishing binary data (protobufs) using confluent-kafka-python, python 2.7. If there is an error when, for example, producing data, you cannot print the error:
*** UnicodeEncodeError: 'ascii' codec can't encode character u'\ufffd' in position 58: ordinal not in range(128)

E.g. to reproduce, try to produce binary data to a non-existent cluster. The callback will receive a KafkaError. err.name() will return _MSG_TIMED_OUT. Calling err.str() will throw the above exception.

Please take a look.

Thanks,

Jack

@edenhill
Copy link
Contributor

Hi,

this is fixed in on master and will be included in the next release (end of june).

If you need the fix sooner than that you'll need to build the module from source (master).

Duplicate of #129

@jackandrews
Copy link
Author

Ah, apologies, didn't spot. Thanks for quick response!

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

No branches or pull requests

2 participants