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

fix: don't crash on properties.body_encoding: utf-8 #1690

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pankgeorg
Copy link

when a message has an properties.body_encoding of utf-8 (e.g. the default on https://github.com/node-celery-ts/node-celery-ts), celery workers crash with an error AttributeError: 'NoneType' object has no attribute 'decode'. utf-8 is functionally equivalent to not providing an encoding, so this should be good.

@pankgeorg pankgeorg changed the title fix: don't crash on 'utf-8' messages fix: don't crash on properties.body_encoding: utf-8 Apr 8, 2023
Copy link
Member

@auvipy auvipy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you please add unit tests for the changes?

@pankgeorg
Copy link
Author

Yes I would love to! can you help be a bit figuring out where the related tests are?

@auvipy
Copy link
Member

auvipy commented Apr 8, 2023

https://github.com/celery/kombu/tree/main/t/unit/transport

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

Successfully merging this pull request may close these issues.

None yet

2 participants