Skip to content

[bug?] TypeError: Object of type datetime is not JSON serializable on ssaw.ExportApi.start() #5

@bedw8

Description

@bedw8

As i can see on these lines

ssaw/ssaw/models.py

Lines 694 to 695 in 45e75e8

from_date: Optional[datetime] = Field(alias="From")
to_date: Optional[datetime] = Field(alias="To")

from_date and to_date parameters on ExportJob must be datetime objects, but then ExportApi.start() throws the error on the title (TypeError: Object of type datetime is not JSON serializable)

I could make this work by converting the datetime objects to str just before the _make_call method.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions