I’ve been trying to open the following Wikipedia image of a dog using PIL. What I’ve tried is the following.
from PIL import Image
import requests
from io import BytesIO
url = "https://upload.wikimedia.org/wikipedia/commons/3/36/Dog_.jpg"
response = requests.get(url)
im = Image.open(requests.get(url, stream=True).raw)
I was wondering about what’s causing the error and if there was any work around?