GoogleAppEngineで、こんなエラーが出た。
ERROR 2010-06-08 10:50:55,015 dev_appserver.py:3237] Exception encountered handling request
Traceback (most recent call last):
File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 3197, in _HandleRequest
self._Dispatch(dispatcher, self.rfile, outfile, env_dict)
File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 3140, in _Dispatch
base_env_dict=env_dict)
File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 522, in Dispatch
base_env_dict=base_env_dict)
File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 2399, in Dispatch
self._module_dict)
File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 2309, in ExecuteCGI
reset_modules = exec_script(handler_path, cgi_path, hook)
File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 2205, in ExecuteOrImportScript
exec module_code in script_module.__dict__
File "C:\Documents and Settings\kabuki\My Documents\GAE\poseritem\get_renderosity.py", line 110, in <module>
main()
File "C:\Documents and Settings\kabuki\My Documents\GAE\poseritem\get_renderosity.py", line 91, in main
freestuff.img = images.resize(img,width=120)
File "C:\Program Files\Google\google_appengine\google\appengine\api\images\__init__.py", line 625, in resize
return image.execute_transforms(output_encoding=output_encoding)
File "C:\Program Files\Google\google_appengine\google\appengine\api\images\__init__.py", line 513, in execute_transforms
response)
File "C:\Program Files\Google\google_appengine\google\appengine\api\apiproxy_stub_map.py", line 78, in MakeSyncCall
return apiproxy.MakeSyncCall(service, call, request, response)
File "C:\Program Files\Google\google_appengine\google\appengine\api\apiproxy_stub_map.py", line 278, in MakeSyncCall
rpc.CheckSuccess()
File "C:\Program Files\Google\google_appengine\google\appengine\api\apiproxy_rpc.py", line 149, in _WaitImpl
self.request, self.response)
File "C:\Program Files\Google\google_appengine\google\appengine\api\apiproxy_stub.py", line 80, in MakeSyncCall
method(request, response)
File "C:\Program Files\Google\google_appengine\google\appengine\api\images\images_stub.py", line 193, in _Dynamic_Transform
response_value = self._EncodeImage(new_image, request.output())
File "C:\Program Files\Google\google_appengine\google\appengine\api\images\images_stub.py", line 215, in _EncodeImage
image.save(image_string, image_encoding)
File "C:\Python25\lib\PIL\Image.py", line 1439, in save
save_handler(self, fp, filename)
File "C:\Python25\lib\PIL\PngImagePlugin.py", line 564, in _save
import ICCProfile
SystemError: Parent module 'PIL' not loaded
INFO 2010-06-08 10:50:55,030 dev_appserver.py:3266] "GET /tasks/renderosity/ HTTP/1.1" 500 -
ちなみにエラーが発生したpythonコードはコレ。
freestuff.img = images.resize(img,width=120)
あちこち見ていると、SDKでのみ起こる現象っぽいがよくわからない。なにかわかったときのために、メモとして問題を残しておくことにしよう。
参考)
Trouble using PIL with Google Appengine SDK - Stack Overflow