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

DeliveredMessage might not have delivery_tag #100

Open
astrojuanlu opened this issue Nov 23, 2020 · 1 comment
Open

DeliveredMessage might not have delivery_tag #100

astrojuanlu opened this issue Nov 23, 2020 · 1 comment

Comments

@astrojuanlu
Copy link

Getting this typing error on my callback that got passed to basic_consume:

error: Item "GetEmpty" of "Union[Deliver, GetEmpty, GetOk]" has no attribute "delivery_tag"  [union-attr]
                await message.channel.basic_ack(message.delivery.delivery_tag)
                                                ^

where message is of type aiormq.types.DeliveredMessage, defined here:

aiormq/aiormq/types.py

Lines 12 to 20 in dde0ce8

DeliveredMessage = typing.NamedTuple(
"DeliveredMessage",
[
("delivery", typing.Union[Basic.Deliver, GetResultType]),
("header", ContentHeader),
("body", bytes),
("channel", "aiormq.Channel"),
],
)

@astrojuanlu astrojuanlu changed the title DeliveredMessage mightnot have delivery_tag DeliveredMessage might not have delivery_tag Nov 23, 2020
@astrojuanlu
Copy link
Author

The problem did not appear with aiormq-3.3.1 pamqp-2.3.0, but it appears with latest aiormq and pamqp.

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

1 participant