From c0c08c55e28b83d85fb4f20a3b015d95bb1df32e Mon Sep 17 00:00:00 2001 From: 6ky Date: Wed, 19 Jul 2023 21:08:22 +0100 Subject: [PATCH] Added Error handling for non JPG/JPEG files --- instagrapi/mixins/photo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instagrapi/mixins/photo.py b/instagrapi/mixins/photo.py index 9aa10411..7cda429f 100644 --- a/instagrapi/mixins/photo.py +++ b/instagrapi/mixins/photo.py @@ -139,7 +139,7 @@ def photo_rupload( tuple (Upload ID for the media, width, height) """ - assert isinstance(path, Path), f"Path must be Path, not {type(path)}" + assert isinstance(path, Path), f"Path must been Path, now {path} ({type(path)})" valid_extensions = ['.jpg', '.jpeg'] if path.suffix.lower() not in valid_extensions: raise ValueError("Invalid file format. Only JPG/JPEG files are supported.")