I'm trying to do import data into odoo (running inside a container) with image url. some of them is webp and whenever odoo try to import those webp it got error :
Traceback (most recent call last): File "<string>", line 1, in <module> File "/var/lib/odoo/.local/lib/python3.10/site-packages/PIL/Image.py", line 3572, in open raise UnidentifiedImageError(msg) PIL.UnidentifiedImageError: cannot identify image file <_io.BytesIO object at 0x75889b2817b0>
Tried this simple code (like the one used by odoo for importing image with url) :
- In container python interpreter, it works without error
- In odoo debugging console, got the error
import io from PIL import Image import requests res = requests.get('https://www.gstatic.com/webp/gallery/1.webp') content = bytearray() for chunk in res.iter_content(32768): content += chunk image = Image.open(io.BytesIO(content))
Odoo tag : 17.0-20250520