diff --git a/gallery_dl/archive.py b/gallery_dl/archive.py index c7438cef..edecb103 100644 --- a/gallery_dl/archive.py +++ b/gallery_dl/archive.py @@ -19,7 +19,8 @@ def connect(path, prefix, format, table=None, mode=None, pragma=None, kwdict=None, cache_key=None): keygen = formatter.parse(prefix + format).format_map - if path.startswith(("postgres://", "postgresql://")): + if isinstance(path, str) and path.startswith( + ("postgres://", "postgresql://")): if mode == "memory": cls = DownloadArchivePostgresqlMemory else: