[求助]上传头像发生错误,Page unavailable

如图

2016-05-17 12:57:24,899 [ERROR] django.request:256 handle_uncaught_exception Internal Server Error: /avatar/add/
Traceback (most recent call last):
File “/opt/filesrv/seafile/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/core/handlers/base.py”, line 132, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File “/opt/filesrv/seafile/seahub/seahub/auth/decorators.py”, line 26, in _wrapped_view
return view_func(request, *args, **kwargs)
File “/opt/filesrv/seafile/seahub/seahub/avatar/views.py”, line 76, in add
avatar.avatar.save(image_file.name, image_file)
File “/opt/filesrv/seafile/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/db/models/fields/files.py”, line 111, in save
self.instance.save()
File “/opt/filesrv/seafile/seahub/seahub/avatar/models.py”, line 150, in save
super(Avatar, self).save(*args, **kwargs)
File “/opt/filesrv/seafile/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/db/models/base.py”, line 734, in save
force_update=force_update, update_fields=update_fields)
File “/opt/filesrv/seafile/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/db/models/base.py”, line 771, in save_base
update_fields=update_fields, raw=raw, using=using)
File “/opt/filesrv/seafile/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/dispatch/dispatcher.py”, line 189, in send
response = receiver(signal=self, sender=sender, **named)
File “/opt/filesrv/seafile/seahub/seahub/avatar/models.py”, line 173, in create_default_thumbnails
instance.create_thumbnail(size)
File “/opt/filesrv/seafile/seahub/seahub/avatar/models.py”, line 98, in create_thumbnail
image = image.crop((diff, 0, w - diff, h))
File “/opt/python2.7/lib/python2.7/site-packages/PIL/Image.py”, line 763, in crop
self.load()
File “/opt/python2.7/lib/python2.7/site-packages/PIL/ImageFile.py”, line 189, in load
d = Image._getdecoder(self.mode, d, a, self.decoderconfig)
File “/opt/python2.7/lib/python2.7/site-packages/PIL/Image.py”, line 385, in _getdecoder
raise IOError(“decoder %s not available” % decoder_name)
IOError: decoder jpeg not available

需要根据你的操作系统版本,把 PIL 的 jpeg 格式支持加上。或者换用 Ubuntu 14.04 或者 CentOS7,按照我们官方文档安装依赖的包即可。

PIL的问题解决了,但是又出现新的问题了
CSS文件404,如图

@daniel.pan,我重装了还是这样,麻烦帮忙看下。

这个问题也不好查,除非远程登录。 最好使用我们推荐和充分测试过的两个平台。

把seahub cache 清下, rm -rf /tmp/seahub_cache/* 或 重启memcached