FireHead90544/craiyon.py

cannot identify image file <_io.BytesIO object

Mathgife opened this issue · 2 comments

Hi! Thanks for the API!

In your example: "Use the images in your code without saving", when I tried to run I obtained the following error:

UnidentifiedImageError: cannot identify image file <_io.BytesIO object at 0x000002AF3B048AE0>

The error points to the line: 5 image = Image.open(BytesIO(base64.decodebytes(i.encode("utf-8"))))

Do you know how to fix this?
Thanks in advance!

I am currently having my university exams these days. I'll be checking it in a day or so. Will be providing a fix by then :)

Hey There @Mathgife,
There was a small bug in the code, it is fixed in the v0.2.0, upgrade to the latest version by running pip install -U craiyon and try again :)

Please re-open this issue, if you still face similar problems.