Skip to content

"Object of type bytes is not JSON serializable" for _nl=on #914

@simonw

Description

@simonw

https://latest.datasette.io/fixtures/binary_data.json?_sort_desc=data&_shape=array returns this:

[
  {
    "rowid": 1,
    "data": "this is binary data"
  }
]

But adding &_nl=on returns this: https://latest.datasette.io/fixtures/binary_data.json?_sort_desc=data&_shape=array&_nl=on

{
  "ok": false,
  "error": "Object of type bytes is not JSON serializable",
  "status": 500,
  "title": null
}

I found this error by running wget -r 127.0.0.1:8001 against my local fixtures.db.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions