diff --git a/gallery_dl/util.py b/gallery_dl/util.py index 48ae0be7e1..f426829d3d 100644 --- a/gallery_dl/util.py +++ b/gallery_dl/util.py @@ -740,8 +740,15 @@ def __init__(self, path, extractor): con.isolation_level = None self.close = con.close self.cursor = con.cursor() - self.cursor.execute("CREATE TABLE IF NOT EXISTS archive " - "(entry PRIMARY KEY) WITHOUT ROWID") + + try: + self.cursor.execute("CREATE TABLE IF NOT EXISTS archive " + "(entry PRIMARY KEY) WITHOUT ROWID") + except sqlite3.OperationalError: + # fallback for missing WITHOUT ROWID support (#553) + self.cursor.execute("CREATE TABLE IF NOT EXISTS archive " + "(entry PRIMARY KEY)") + self.keygen = (extractor.category + extractor.config( "archive-format", extractor.archive_fmt) ).format_map