Open Matiz7 opened 5 years ago
I see the same error upon creating an instance of Image
of an .MP4 file.
Traceback (most recent call last):
File "/Users/Paul/pyzel/pyzel.py", line 15, in <module>
image = Image(img_file)
File "/Users/Paul/Library/Caches/pypoetry/virtualenvs/pyzel-py3.7/lib/python3.7/site-packages/exif/_image.py", line 53, in __init__
self._parse_segments(img_hex)
File "/Users/Paul/Library/Caches/pypoetry/virtualenvs/pyzel-py3.7/lib/python3.7/site-packages/exif/_image.py", line 41, in _parse_segments
self._segments['APP1'] = App1MetaData(img_hex[app1_start_index:cursor])
File "/Users/Paul/Library/Caches/pypoetry/virtualenvs/pyzel-py3.7/lib/python3.7/site-packages/exif/_app1_metadata.py", line 184, in __init__
self._unpack_ifd_tags()
File "/Users/Paul/Library/Caches/pypoetry/virtualenvs/pyzel-py3.7/lib/python3.7/site-packages/exif/_app1_metadata.py", line 82, in _unpack_ifd_tags
self._segment_hex.set_endianness(self._segment_hex.read(cursor, 2))
File "/Users/Paul/Library/Caches/pypoetry/virtualenvs/pyzel-py3.7/lib/python3.7/site-packages/exif/_hex_interface.py", line 112, in set_endianness
assert endian_constant in [EXIF_BIG_ENDIAN_HEADER, EXIF_LITTLE_ENDIAN_HEADER]
AssertionError
This is due to file formats of Image files you may be using. EXIF (Exchangeable Image File Format) is typically stored in JPG/JPEG formats. try changing the format to either of them it will surely work.