{"html_url": "https://github.com/dogsheep/dogsheep-beta/issues/24#issuecomment-694551406", "issue_url": "https://api.github.com/repos/dogsheep/dogsheep-beta/issues/24", "id": 694551406, "node_id": "MDEyOklzc3VlQ29tbWVudDY5NDU1MTQwNg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-09-17T23:22:07Z", "updated_at": "2020-09-17T23:22:07Z", "author_association": "MEMBER", "body": "Neat, I can debug this with the new `--pdb` option:\r\n\r\n datasette . --get '/-/beta?q=pycon&sort=oldest' --pdb\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 703970814, "label": "the JSON object must be str, bytes or bytearray, not 'Undefined'"}, "performed_via_github_app": null} {"html_url": "https://github.com/dogsheep/dogsheep-beta/issues/24#issuecomment-694551646", "issue_url": "https://api.github.com/repos/dogsheep/dogsheep-beta/issues/24", "id": 694551646, "node_id": "MDEyOklzc3VlQ29tbWVudDY5NDU1MTY0Ng==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-09-17T23:22:48Z", "updated_at": "2020-09-17T23:22:48Z", "author_association": "MEMBER", "body": "Looks like its happening in a Jinja fragment template for one of the results:\r\n```\r\n /Users/simon/Dropbox/Development/dogsheep-beta/dogsheep_beta/__init__.py(169)process_results()\r\n-> output = compiled.render({**result, **{\"json\": json}})\r\n /Users/simon/.local/share/virtualenvs/dogsheep-beta-u_po4Rpj/lib/python3.8/site-packages/jinja2/asyncsupport.py(71)render()\r\n-> return original_render(self, *args, **kwargs)\r\n /Users/simon/.local/share/virtualenvs/dogsheep-beta-u_po4Rpj/lib/python3.8/site-packages/jinja2/environment.py(1090)render()\r\n-> self.environment.handle_exception()\r\n /Users/simon/.local/share/virtualenvs/dogsheep-beta-u_po4Rpj/lib/python3.8/site-packages/jinja2/environment.py(832)handle_exception()\r\n-> reraise(*rewrite_traceback_stack(source=source))\r\n /Users/simon/.local/share/virtualenvs/dogsheep-beta-u_po4Rpj/lib/python3.8/site-packages/jinja2/_compat.py(28)reraise()\r\n-> raise value.with_traceback(tb)\r\n