We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
try: img = ImageOps.exif_transpose(img) except TypeError: print(f"TypeError occurred!, file {img_path}")
rotate the file 90 degrees
exception TypeError
error occurs here
def tobytes(self, offset=8): ... return b"Exif\x00\x00" + head + ifd.tobytes(offset) TiffImagePlugin.py:: tobytes(self, offset=0): ... for tag, value in sorted(self._tags_v2.items()): ..... 41th interation tag ==5, value=0 ... logger.debug(f"Tag {tag}, Type: {typ}, Value: {repr(value)}") 'Tag 5, Type: 1, Value: 0' ... values = value if isinstance(value, tuple) else (value,) .... value==(0,) data = self._write_dispatch[typ](self, *values) .... data==0 ... msg = f"save: {tagname} ({tag}) - type: {typname} ({typ})" .... at this point msg == 'save: GPSAltitudeRef (5) - type: byte (1)' ... this statement crashes because len(data) TypeError: object of type 'int' has no len() msg += " - value: " + ( "<table: %d bytes>" % len(data) if len(data) >= 16 else str(values) )
debug logging causes the crash.
OS: Ubuntu 18.04.6 LTS (x86_64)
docker image FROM pytorch/pytorch:1.13.1-cuda11.6-cudnn8-runtime
Python: Python version: 3.10.8 (main, Nov 4 2022, 13:48:29) [GCC 11.2.0] (64-bit runtime) Python platform: Linux-5.15.0-78-generic-x86_64-with-glibc2.27
Pillow: '9.3.0'
Here is one of may files having this problem.
The text was updated successfully, but these errors were encountered:
Hi. Testing your image, this was fixed by #6740 in Pillow 9.4.0.
So the solution here is simply to upgrade your Pillow to a more recent version.
Sorry, something went wrong.
Thank you
No branches or pull requests
What did you do?
What did you expect to happen?
rotate the file 90 degrees
What actually happened?
exception TypeError
error occurs here
debug logging causes the crash.
What are your OS, Python and Pillow versions?
OS: Ubuntu 18.04.6 LTS (x86_64)
docker image FROM pytorch/pytorch:1.13.1-cuda11.6-cudnn8-runtime
Python: Python version: 3.10.8 (main, Nov 4 2022, 13:48:29) [GCC 11.2.0] (64-bit runtime)
Python platform: Linux-5.15.0-78-generic-x86_64-with-glibc2.27
Pillow: '9.3.0'
Here is one of may files having this problem.
The text was updated successfully, but these errors were encountered: