I have used sqlite3_connection.iterdump() method to dump the sqlite3 the database.
I have written a module in python that dumps out the sqlite3 tables. The module works fine if I run it locally in my machine.
And, After creating a python package of the module using pyinstaller, if I try to dump out the database it gives an error saying
"ImportError: No module named sqlite3.dump"
Any idea how I can solve this issue. Or is there any alternative to get the sqlite3 dump.
Here is what I'm following to dump the database.
#Export database
def export_database(self):
database_string = ""
for line in self.conn.iterdump():
database_string += '%s\n' % (line)
return database_string
#Import database
def import_database(self, database_string):
self.cursor.executescript(database_string)