12

So if I create a db in Python using the sqlite3 package:

import sqlite3
con = sqlite3.connect('test.db')

I can't open the db using the sqlite command line in bash:

sqlite test.db
Unable to open database "test": file is encrypted or is not a database

I can however connect to a db created with the sqlite command line using sqlite3 in Python.

How can I open the Python created dbs in the sqlite command line?

Dirk Calloway
  • 2,569
  • 4
  • 23
  • 34
  • 1
    Have you read these posts: about version mismatch http://stackoverflow.com/questions/1513849/error-file-is-encrypted-or-is-not-a-database or about password problem http://stackoverflow.com/questions/16030601/sqlite-unable-to-open-database-file-is-encrypted-or-is-not-a-database-c? – goose May 05 '14 at 11:39

1 Answers1

21

Install sqlite3 and use sqlite3 test.db in bash.

furas
  • 134,197
  • 12
  • 106
  • 148