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

error sending event with extensions #24

Closed
ryandawsonuk opened this issue Feb 27, 2020 · 0 comments · Fixed by #25
Closed

error sending event with extensions #24

ryandawsonuk opened this issue Feb 27, 2020 · 0 comments · Fixed by #25

Comments

@ryandawsonuk
Copy link
Contributor

ryandawsonuk commented Feb 27, 2020

Error at

for key, value in props.get("extensions"):

I get:

cloudevents/sdk/event/base.py", line 157, in MarshalBinary
    for key, value in props.get("extensions"):
ValueError: too many values to unpack (expected 2)

I think it should be props.get("extensions").items().

I think I'm hitting this because I'm creating one event from another and specifically passing on the extensions using SetExtensions rather adding each as an item:

            revent = (
                v02.Event().
                    SetContentType("application/json").
                    SetData(responseStr).
                    SetEventID(resp_event_id).
                    SetSource(self.model.event_source()).
                    SetEventType(self.event_type).
                    SetExtensions(event.Extensions())
            )
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 a pull request may close this issue.

1 participant