You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def restore_dump(self, dump):
if not self.connection.is_usable():
self.connection.connect()
cursor = self.connection.cursor()
for line in dump.readlines():
try:
cursor.execute(line.decode('UTF-8'))
except OperationalError as err:
warnings.warn("Error in db restore: {}".format(err))
except IntegrityError as err:
warnings.warn("Error in db restore: {}".format(err))
The function will not performer as expected if one field has a line break because the SQL instruction will be truncate.
I get a UserWarning when running dbrestore for an sqlite database:
UserWarning: Error in db restore: unrecognized token:
And then a print of some text I have entered in a field. This only happens on Textfields that have line breaks. The rest of the db restore seems to work as expected.
The text was updated successfully, but these errors were encountered:
For SQLite, the restore function is
The function will not performer as expected if one field has a line break because the SQL instruction will be truncate.
From the issue #238
The text was updated successfully, but these errors were encountered: