Reputation: 21
running the following code:
from PIL import *
from psd_tools import *
psd = PSDImage.load('test.psd')
I receive this error:
Traceback (most recent call last):
File "<pyshell#4>", line 1, in <module>
psd = PSDImage.load('test.psd')
File "/Library/Python/2.7/site-packages/psd_tools/user_api/psd_image.py", line 192, in load
return cls.from_stream(fp, encoding)
File "/Library/Python/2.7/site-packages/psd_tools/user_api/psd_image.py", line 200, in from_stream
psd_tools.reader.parse(fp, encoding)
File "/Library/Python/2.7/site-packages/psd_tools/decoder/decoder.py", line 30, in parse
image_resource_blocks = image_resources.decode(reader_parse_result.image_resource_blocks),
File "/Library/Python/2.7/site-packages/psd_tools/decoder/image_resources.py", line 58, in decode
return [parse_image_resource(res) for res in image_resource_blocks]
File "/Library/Python/2.7/site-packages/psd_tools/decoder/image_resources.py", line 68, in parse_image_resource
return resource._replace(data = decoder(resource.data))
File "/Library/Python/2.7/site-packages/psd_tools/decoder/image_resources.py", line 141, in _decode_icc
return ImageCms.ImageCmsProfile(io.BytesIO(data))
File "/Library/Python/2.7/site-packages/PIL/ImageCms.py", line 158, in __init__
self._set(core.profile_frombytes(profile.read()))
AttributeError: 'module' object has no attribute 'profile_frombytes'
I have taken steps to reinstall PIL, Pillow, psd-tools, and dependencies.
I am at a loss to get to the bottom of this.
Running Python 2.7 on Mac OSX 10.7.5
edit: here is the output requested--
/Library/Python/2.7/site-packages/PIL/_imagingcms.so:
/usr/local/lib/liblcms.1.0.19.dylib (compatibility version 2.0.0, current version 2.19.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0)
Pillow version : 2.5.0
Upvotes: 1
Views: 1106
Reputation: 21
Answer found from Lukas Graf. See comments above.
Little CMS needed updating to latest version.
$ brew install little-cms2
$ pip uninstall pillow
$ pip install pillow
Upvotes: 1