"OSError: cannot identify image file" opening image with PIL/Image

: Sometimes files are saved as .jpeg but are actually a different format (like .heic from an iPhone or a .webp from a browser) that your current software cannot read.

: On macOS, similar alphanumeric filenames can sometimes be temporary hidden files that aren't actually viewable images. How to Fix or Open the File