1

I am heving troubles migrating to python 3. This is my code:

from io import StringIO
from PIL import Image
import requests
r = requests.get(imagen_url)
imagen = Image.open(StringIO(r.content))

It used to work on python 2. This is the error I get:

initial_value must be str or None, not bytes

Alejandro Veintimilla
  • 10,743
  • 23
  • 91
  • 180

0 Answers0