[Zope] How to install PIL with Zope.
Yuji Sato
yujis@yujis.org
Thu, 08 Aug 2002 14:30:03 +0900
Thank you Max, Dieter and Sumiya.
I compiled PIL again.
# cd libImaging
# ./configure
# make
#
# cd ..
# /opt/zope/bin/python setup.py build
# /opt/zope/bin/python setup.py install
#
#/opt/zope/bin/python
>>> import Image
>>> import _imaging
#
/opt/zope/lib/python2.1/site-packages/PIL
/opt/zope/lib/python2.1/site-packages/PIL.pth
/opt/zope/lib/python2.1/site-packages/PIL/_imaging.so
Then restart Zope
From ZMI Debug Infomation at /Control_Panel/DebugInfo
#I got to know for the first time about DebugInfo today.
sys.path:
/opt/zope/lib/python/ZopeZODB3
/opt/zope/lib/python
/opt/zope
/opt/zope
/opt/zope/lib/python2.1
/opt/zope/lib/python2.1/plat-linux2
/opt/zope/lib/python2.1/lib-tk
/opt/zope/lib/python2.1/lib-dynload
/opt/zope/lib/python2.1/site-packages
/opt/zope/lib/python2.1/site-packages/PIL
# cat /opt/zope/lib/python/Products/Photo/__init__.py
"""Photo and Photo Folder"""
__version__ = '1.2.3'
from Photo import Photo, manage_addPhotoForm, manage_addPhoto
from PhotoFolder import PhotoFolder, manage_addPhotoFolderForm,
manage_addPhotoF
older
def initialize(registrar):
registrar.registerClass(
Photo,
constructors = (manage_addPhotoForm, manage_addPhoto),
icon = 'www/photo.gif'
)
registrar.registerClass(
PhotoFolder,
constructors = (manage_addPhotoFolderForm, manage_addPhotoFolder),
icon = 'www/photofolder.gif'
)
I added "Photo" and checked to "Pregenerate Displays".
Error Type: AttributeError
Error Value: superValues
Traceback (innermost last):
File /opt/zope/lib/python/ZPublisher/Publish.py, line 150, in
publish_module
File /opt/zope/lib/python/ZPublisher/Publish.py, line 114, in publish
File /opt/zope/lib/python/Zope/__init__.py, line 159, in
zpublisher_exception_hook
File /opt/zope/lib/python/ZPublisher/Publish.py, line 98, in publish
File /opt/zope/lib/python/ZPublisher/mapply.py, line 88, in mapply
(Object: manage_addPhoto)
File /opt/zope/lib/python/ZPublisher/Publish.py, line 39, in call_object
(Object: manage_addPhoto)
File /opt/zope/lib/python/Products/Photo/Photo.py, line 655, in
manage_addPhoto
File /opt/zope/lib/python/OFS/ObjectManager.py, line 267, in _setObject
(Object: Zope)
File /opt/zope/lib/python/Products/Photo/Photo.py, line 631, in
manage_afterAdd
(Object: test.jpg)
File /opt/zope/lib/python/Products/ZFS/objectHandlers.py, line 41, in
manage_afterAdd
(Object: test_thumbnail.jpg)
File /opt/zope/lib/python/Products/ZFS/objectHandlers.py, line 194, in
manage_afterAdd
File /opt/zope/lib/python/Products/ZFS/objectHandlers.py, line 130, in
_changeAttr
AttributeError: (see above)
I added "Photo" and no checked to "Pregenerate Disply".
Then
1. "Settings" Pregenerate Displays is checked.
2. "Display" submit of Regenerate All.
It's a works!
Why is a difference in two operation?
regards Yujis.