[E 130722 17:01:50 web:1228] Uncaught exception POST /upload/avatar?_xsrf=843696644fc140f99a301c6cafe76fb9 (192.168.10.149)
HTTPRequest(protocol='http', host='192.168.10.149:8008', method='POST', uri='/upload/avatar?_xsrf=843696644fc140f99a301c6cafe76fb9', version='HTTP/1.1', remote_ip='192.168.10.149', headers={'Origin': 'http://192.168.10.149:8008', 'Content-Length': '156782', 'Accept-Language': 'en-US,en;q=0.8', 'Accept-Encoding': 'gzip,deflate,sdch', 'Host': '192.168.10.149:8008', 'Accept': 'application/json, text/javascript, /; q=0.01', 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.116 Safari/537.36', 'Connection': 'keep-alive', 'X-Requested-With': 'XMLHttpRequest', 'Referer': 'http://192.168.10.149:8008/account/setting', 'Cookie': '_xsrf=843696644fc140f99a301c6cafe76fb9; user="eyJ0b2tlbiI6ICJ4cDhrOExsVlo5eERJZGJpIiwgImlkIjogMX0=|1374225921|1d5dc482098a44a801c268ada984be4665249816"; index_category="ImRlc2VydCI=|1374482182|58be6c23e291f4a8f1451ab7369491d97de660d1"', 'Content-Type': 'multipart/form-data; boundary=----WebKitFormBoundaryDeGLbwgBaBUcGUIP'})
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/tornado-3.1-py2.7.egg/tornado/web.py", line 1141, in _when_complete
callback()
File "/usr/local/lib/python2.7/dist-packages/tornado-3.1-py2.7.egg/tornado/web.py", line 1162, in _execute_method
self._when_complete(method(_self.path_args, *_self.path_kwargs),
File "/usr/local/lib/python2.7/dist-packages/pony/orm/core.py", line 3563, in new_func
with self: return old_func(_args, *_kwargs)
File "/home/cmbuild/github/collipa/controllers/user.py", line 482, in post
image_one.save(tmp_name)
File "/usr/local/lib/python2.7/dist-packages/PIL/Image.py", line 1406, in save
self.load()
File "/usr/local/lib/python2.7/dist-packages/PIL/ImageFile.py", line 189, in load
d = Image._getdecoder(self.mode, d, a, self.decoderconfig)
File "/usr/local/lib/python2.7/dist-packages/PIL/Image.py", line 385, in _getdecoder
raise IOError("decoder %s not available" % decoder_name)
IOError: decoder jpeg not available
[I 130722 17:01:50 web:1635] 302 POST /upload/avatar?_xsrf=843696644fc140f99a301c6cafe76fb9 (192.168.10.149) 24.20ms
[E 130722 17:01:50 web:796] Uncaught exception in write_error
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/tornado-3.1-py2.7.egg/tornado/web.py", line 794, in send_error
self.write_error(status_code, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/tornado-3.1-py2.7.egg/tornado/web.py", line 827, in write_error
self.finish(self.get_error_html(status_code, *_kwargs))
File "/usr/local/lib/python2.7/dist-packages/tornado-3.1-py2.7.egg/tornado/web.py", line 728, in finish
raise RuntimeError("finish() called twice. May be caused "
RuntimeError: finish() called twice. May be caused by using async operations without the @asynchronous decorator.
[I 130722 17:01:50 web:1635] 200 GET / (192.168.10.149) 39.45ms
上传头像遇到上面的问题,貌似是处理图片的decoder 没有。
确认了一下 PIL 的确安装成功了