I am trying to load an image from a specific URL using the Image.Open() method from the PIL library, however I am getting the following error:
'Response' object has no attribute 'read'
My code is as follows:
image1 = Image.open(requests.get(URL))
This is addressed in the requests Quickstart:
from PIL import Image
from io import BytesIO
i = Image.open(BytesIO(r.content))
where r is a Response object such that r = requests.get(URL).