SQLite Forum

how to open or create db in sqlite3
Login
It appears that you are using Python's SQLite adaptor according to its exposed methods and their signatures. (This not saying much.)

Your Python code, exclusive of its SQLite adaptor aspects, is failing. That makes this a Python question rather than a SQLite question, hence off-topic here.

Tip: The name 'na' appears undefined where used.