From 2983a3b87aa938605a6307092d259905885af8a5 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Mon, 9 Sep 2019 15:45:19 +0200 Subject: [PATCH] Workaround for SQLite VACUUM on Python 3.6.0 --- pyrogram/client/storage/file_storage.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pyrogram/client/storage/file_storage.py b/pyrogram/client/storage/file_storage.py index e367b447..b9529504 100644 --- a/pyrogram/client/storage/file_storage.py +++ b/pyrogram/client/storage/file_storage.py @@ -108,7 +108,10 @@ class FileStorage(MemoryStorage): self.create() with self.conn: - self.conn.execute("VACUUM") + try: # Python 3.6.0 (exactly this version) is bugged and won't successfully execute the vacuum + self.conn.execute("VACUUM") + except sqlite3.OperationalError: + pass def destroy(self): os.remove(self.database)