home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 895577012

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions issue performed_via_github_app
https://github.com/simonw/sqlite-utils/issues/309#issuecomment-895577012 https://api.github.com/repos/simonw/sqlite-utils/issues/309 895577012 IC_kwDOCGYnMM41YWu0 9599 2021-08-09T21:55:52Z 2021-08-09T21:59:03Z OWNER

Yeah this error message could certainly be more helpful.

I thought OverflowError might be one of the SQLite exceptions: https://docs.python.org/3/library/sqlite3.html#exceptions - but it turns out it's actually reusing the Python built-in OverflowError class: python import sqlite3 db = sqlite3.connect(":memory:") caught = [] try: db.execute("create table foo (number integer)") db.execute("insert into foo (number) values (?)", [34223049823094832094802398430298048240]) except Exception as e: print(e) caught.append(e) isinstance(caught[0], OverflowError) Here's where that happens in the Python sqlite3 module code: https://github.com/python/cpython/blob/058fb35b57ca8c5063d16ec818e668b3babfea65/Modules/_sqlite/util.c#L123-L124

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
963897111  
Powered by Datasette · Queries took 1.027ms · About: github-to-sqlite