pythondatabasesqlite

sqlite's fetchall returns None instead of an empty list


According to the sqlite3 docs, fetchall() returns a list (empty if no rows meet the search criteria). On occasion, not repeatable, I am getting a return value None. What could None indicate, failed access to the DB? a missing table?


Solution

  • From a brief look at the source, it does not seem possible, barring memory corruption, for sqlite3's cursor's fetchall to return None. You must be doing something else that results in None.