You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a BytesIO object is handed to the predict_SMILES function, the following error occurs. This used to work without any problems.
It seems like this behaviour has been introduced with the HEIC/HEIF compatibility. Can we check for the image type differently without checking for 'HEIC' in the name?
File "/home/otto/.local/lib/python3.8/site-packages/DECIMER/decimer.py", line 109, in predict_SMILES
chemical_structure = config.decode_image(image_path)
File "/home/otto/.local/lib/python3.8/site-packages/DECIMER/config.py", line 197, in decode_image
img = remove_transparent(image_path)
File "/home/otto/.local/lib/python3.8/site-packages/DECIMER/config.py", line 110, in remove_transparent
if pathlib.Path(image_path).suffix == ".HEIC":
File "/usr/lib/python3.8/pathlib.py", line 1042, in __new__
self = cls._from_parts(args, init=False)
File "/usr/lib/python3.8/pathlib.py", line 683, in _from_parts
drv, root, parts = self._parse_args(args)
File "/usr/lib/python3.8/pathlib.py", line 667, in _parse_args
a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not _io.BytesIO
The text was updated successfully, but these errors were encountered:
If a BytesIO object is handed to the predict_SMILES function, the following error occurs. This used to work without any problems.
It seems like this behaviour has been introduced with the HEIC/HEIF compatibility. Can we check for the image type differently without checking for 'HEIC' in the name?
The text was updated successfully, but these errors were encountered: