Skip to content

Commit

Permalink
Added Error handling for non JPG/JPEG files
Browse files Browse the repository at this point in the history
  • Loading branch information
6ky committed Jul 19, 2023
1 parent e6ff12e commit c0c08c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion instagrapi/mixins/photo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand Down

0 comments on commit c0c08c5

Please sign in to comment.