Skip to content

Not able to send attachments in messages. "Attachment is not JSON serializable" #20

@markospacetech

Description

@markospacetech

using the example

views = Views()
image = ImageView(original=Image(src=url, width=400, height=400),filename=filename)
views.image = image
attachment = Attachment(title="xxx", description="xxx", views=views)

res = chat.send_message(token="token url", to="channel name", text="xxx", attachments=[attachment])

gives the error

TypeError: Object of type Attachment is not JSON serializable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions