From e0599d35dcfa8c2ccd79f3d88753c4b63a6cc0f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Sun, 20 Jul 2025 19:57:27 +0200 Subject: [PATCH] [civitai] fix 'AttributeError' when a file's post was deleted (#7860) --- gallery_dl/extractor/civitai.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gallery_dl/extractor/civitai.py b/gallery_dl/extractor/civitai.py index 8d6a1252..e4a81ee8 100644 --- a/gallery_dl/extractor/civitai.py +++ b/gallery_dl/extractor/civitai.py @@ -126,7 +126,8 @@ class CivitaiExtractor(Extractor): data["post"] = file.pop("post") if self._meta_post and "post" not in data: data["post"] = post = self._extract_meta_post(file) - post.pop("user", None) + if post: + post.pop("user", None) file["date"] = text.parse_datetime( file["createdAt"], "%Y-%m-%dT%H:%M:%S.%fZ")