{"html_url": "https://github.com/simonw/datasette/issues/891#issuecomment-692968792", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/891", "id": 692968792, "node_id": "MDEyOklzc3VlQ29tbWVudDY5Mjk2ODc5Mg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-09-15T20:44:15Z", "updated_at": "2020-09-15T20:44:15Z", "author_association": "OWNER", "body": "https://github.com/peter-wangxu/persist-queue/issues/74 warns that this might not work with PyPy.\r\n\r\nI could solve that with:\r\n```python\r\nif hasattr(sqlite3, \"enable_callback_tracebacks\"):\r\n sqlite3.enable_callback_tracebacks(True)\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 653529088, "label": "Consider using enable_callback_tracebacks(True)"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/891#issuecomment-692998061", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/891", "id": 692998061, "node_id": "MDEyOklzc3VlQ29tbWVudDY5Mjk5ODA2MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-09-15T21:49:03Z", "updated_at": "2020-09-15T21:49:03Z", "author_association": "OWNER", "body": "I've been trying to figure out why this is an optional setting that defaults to off.\r\n\r\nI think it's because it writes directly to `stderr`, so the maintainers of `sqlite3` reasonably decided that people should be able to opt in to that rather than having weird stuff show up on `stderr` that they weren't expecting.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 653529088, "label": "Consider using enable_callback_tracebacks(True)"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/891#issuecomment-692999893", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/891", "id": 692999893, "node_id": "MDEyOklzc3VlQ29tbWVudDY5Mjk5OTg5Mw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-09-15T21:53:36Z", "updated_at": "2020-09-15T21:53:36Z", "author_association": "OWNER", "body": "Here's the commit (from 15 years ago) where `enable_callback_tracebacks` was first added: https://github.com/ghaering/pysqlite/commit/1e8bd36be93b7d7425910642b72e4152c77b0dfd\r\n\r\n> - Exceptions in callbacks lead to the query being aborted now instead of silently leading to generating values.\r\n> - Exceptions in callbacks can be echoed to stderr if you call the module level function enable_callback_tracebacks: enable_callback_tracebacks(1).", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 653529088, "label": "Consider using enable_callback_tracebacks(True)"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/891#issuecomment-693000522", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/891", "id": 693000522, "node_id": "MDEyOklzc3VlQ29tbWVudDY5MzAwMDUyMg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-09-15T21:55:11Z", "updated_at": "2020-09-15T21:55:11Z", "author_association": "OWNER", "body": "I'm going to turn this on. If people complain about it I can turn it off again (or make it a configuration setting).", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 653529088, "label": "Consider using enable_callback_tracebacks(True)"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/891#issuecomment-693001937", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/891", "id": 693001937, "node_id": "MDEyOklzc3VlQ29tbWVudDY5MzAwMTkzNw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-09-15T21:58:56Z", "updated_at": "2020-09-15T21:58:56Z", "author_association": "OWNER", "body": "Here's what that looks like:\r\n```\r\nTraceback (most recent call last):\r\n File \"/Users/simon/Dropbox/Development/datasette/plugins/sql_error.py\", line 5, in oh_no_error\r\n return 100 / 0\r\nZeroDivisionError: division by zero\r\nERROR: conn=, sql = 'select oh_no_error()', params = {}: user-defined function raised exception\r\nINFO: 127.0.0.1:54066 - \"GET /data?sql=select+oh_no_error%28%29 HTTP/1.1\" 400 Bad Request\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 653529088, "label": "Consider using enable_callback_tracebacks(True)"}, "performed_via_github_app": null}