-
Notifications
You must be signed in to change notification settings - Fork 201
Description
Excuse me, i have this error trying to open some psd files.
This file open correctly in any other program but i cant with the lates version 1.9.11
Traceback (most recent call last):
File "./test.py", line 18, in
psd = PSDImage.open("./test2.psd")
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/psd_tools/api/psd_image.py", line 104, in open
self = cls(PSD.read(f, **kwargs))
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/psd_tools/psd/init.py", line 72, in read
LayerAndMaskInformation.read(fp, encoding, header.version),
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/psd_tools/psd/layer_and_mask.py", line 58, in read
self = cls._read_body(fp, end_pos, encoding, version)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/psd_tools/psd/layer_and_mask.py", line 65, in _read_body
layer_info = LayerInfo.read(fp, encoding, version)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/psd_tools/psd/layer_and_mask.py", line 131, in read
self = cls._read_body(fp, encoding, version)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/psd_tools/psd/layer_and_mask.py", line 140, in _read_body
layer_records = LayerRecords.read(fp, layer_count, encoding, version)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/psd_tools/psd/layer_and_mask.py", line 339, in read
items.append(LayerRecord.read(fp, encoding, version))
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/psd_tools/psd/layer_and_mask.py", line 444, in read
*cls._read_extra(f, encoding, version)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/psd_tools/psd/layer_and_mask.py", line 458, in _read_extra
tagged_blocks = TaggedBlocks.read(fp, version=version, padding=1)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/psd_tools/psd/tagged_blocks.py", line 158, in read
block = TaggedBlock.read(fp, version, padding)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/psd_tools/psd/tagged_blocks.py", line 256, in read
data = kls.frombytes(raw_data, version=version)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/psd_tools/psd/base.py", line 68, in frombytes
return self.read(f, *args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/psd_tools/psd/adjustments.py", line 192, in read
extra = CurvesExtraMarker.read(fp, is_map=is_map)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/psd_tools/psd/adjustments.py", line 225, in read
signature, version, count = read_fmt('4sHI', fp)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/psd_tools/utils.py", line 37, in read_fmt
) == fmt_size, 'read=%d, expected=%d' % (len(data), fmt_size)
AssertionError: read=3, expected=10
test2.psd.zip