1

我想我在photologue 文档中描述了一个关于同时安装 PIL 和 Pillow 的问题。Webfaction 默认安装了 PIL,我似乎无法卸载它。文档说“写一个临时文件/tmp/PHOTOLOGUE_NO_PILLOW”,但我不确定这是一个文件还是一个目录或者放在哪里。

编辑:感谢 rajasimon,我正确地将文件放入 temp 中,现在没有 Pillow 与 PIL 冲突(我测试过并且无法导入 Pillow 但可以导入 PIL)但当它尝试自动调整照片大小时仍然出现相同的错误:

Exception Type: UnsupportedOperation at /admin/photologue/photo/add/
Exception Value: fileno

在 webfaction 上安装 photologue 的最佳方法是什么?

Photologue 安装正常,但是当我尝试添加图像时出现以下错误:

Environment:

Request Method: POST
Request URL: http://passiveaggressivenews.twoifiplay.com/admin/photologue/photo/add/

Django Version: 1.7.1
Python Version: 2.7.8
Installed Applications:
('django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'taggit',
 'panews',
 'django.contrib.sites',
 'crispy_forms',
 'django_bleach',
 'django_wysiwyg',
 'django_social_share',
 'photologue',
 'sortedm2m')
Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware')


Traceback:
File "/home/nlivni/webapps/passiveaggressivenews/lib/python2.7/django/core/handlers/base.py" in get_response
  111.                     response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/nlivni/webapps/passiveaggressivenews/lib/python2.7/django/contrib/admin/options.py" in wrapper
  584.                 return self.admin_site.admin_view(view)(*args, **kwargs)
File "/home/nlivni/webapps/passiveaggressivenews/lib/python2.7/django/utils/decorators.py" in _wrapped_view
  105.                     response = view_func(request, *args, **kwargs)
File "/home/nlivni/webapps/passiveaggressivenews/lib/python2.7/django/views/decorators/cache.py" in _wrapped_view_func
  52.         response = view_func(request, *args, **kwargs)
File "/home/nlivni/webapps/passiveaggressivenews/lib/python2.7/django/contrib/admin/sites.py" in inner
  204.             return view(request, *args, **kwargs)
File "/home/nlivni/webapps/passiveaggressivenews/lib/python2.7/django/contrib/admin/options.py" in add_view
  1454.         return self.changeform_view(request, None, form_url, extra_context)
File "/home/nlivni/webapps/passiveaggressivenews/lib/python2.7/django/utils/decorators.py" in _wrapper
  29.             return bound_func(*args, **kwargs)
File "/home/nlivni/webapps/passiveaggressivenews/lib/python2.7/django/utils/decorators.py" in _wrapped_view
  105.                     response = view_func(request, *args, **kwargs)
File "/home/nlivni/webapps/passiveaggressivenews/lib/python2.7/django/utils/decorators.py" in bound_func
  25.                 return func.__get__(self, type(self))(*args2, **kwargs2)
File "/home/nlivni/webapps/passiveaggressivenews/lib/python2.7/django/db/transaction.py" in inner
  394.                 return func(*args, **kwargs)
File "/home/nlivni/webapps/passiveaggressivenews/lib/python2.7/django/contrib/admin/options.py" in changeform_view
  1405.                 self.save_model(request, new_object, form, not add)
File "/home/nlivni/webapps/passiveaggressivenews/lib/python2.7/django/contrib/admin/options.py" in save_model
  1046.         obj.save()
File "/home/nlivni/lib/python2.7/photologue/models.py" in save
  540.         super(Photo, self).save(*args, **kwargs)
File "/home/nlivni/lib/python2.7/photologue/models.py" in save
  492.         self.pre_cache()
File "/home/nlivni/lib/python2.7/photologue/models.py" in pre_cache
  473.                 self.create_size(photosize)
File "/home/nlivni/lib/python2.7/photologue/models.py" in create_size
  455.             raise e

Exception Type: UnsupportedOperation at /admin/photologue/photo/add/
Exception Value: fileno

我无法找到任何看起来相似的东西,文档中提到了“奇怪的错误”,看起来就是这样。任何帮助表示赞赏。

谢谢!

4

1 回答 1

0

记住tmp/是一个目录..

该目录主要包含临时需要的文件

使用终端访问您的专用服务器并使用cd /tmp. 使用触摸创建新文件后

>touch PHOTOLOGUE_NO_PILLOW
于 2014-11-23T08:44:21.247 回答