pillow is not in the list, hence attempts to use the API result in the following:
Traceback (most recent call last):
File "/private/tmp/food/test.py", line 1, in <module>
import openfoodfacts
File "/private/tmp/food/.venv/lib/python3.12/site-packages/openfoodfacts/__init__.py", line 1, in <module>
from .api import API
File "/private/tmp/food/.venv/lib/python3.12/site-packages/openfoodfacts/api.py", line 6, in <module>
from .utils import URLBuilder, http_session
File "/private/tmp/food/.venv/lib/python3.12/site-packages/openfoodfacts/utils.py", line 354, in <module>
) -> Union[ImageDownloadItem, Image.Image, None]:
After pip install pillow the list looks as follows:
What
Running
pip install openfoodfacts
results with the following in a freshvenv
:pillow
is not in the list, hence attempts to use the API result in the following:After
pip install pillow
the list looks as follows:and the API works.
Steps to reproduce the behavior:
python3 -m venv .venv
source .venv/bin/activate
pip install openfoodfacts
pillow
is missingExpected behavior
pillow
should be installed as a required dependency.Could it be because of the
optional = True
key set in this line? https://github.com/openfoodfacts/openfoodfacts-python/blob/8d1013a01c8fa674c1c84fd1729b73c621b5edd3/pyproject.toml#L26Platform (Desktop, Mobile, Hunger Games)