django photologue on webfaction

328 views Asked by At

I think I've got an issue described in the photologue docs regarding having both PIL and Pillow installed at the same time. Webfaction has PIL installed by default and I can't seem to uninstall it. The docs say "write a temporary file /tmp/PHOTOLOGUE_NO_PILLOW" but I'm not sure if that's a file or a directory or where to put it.

EDIT: Thanks to rajasimon I correctly put the file in temp and now there is no Pillow to conflict with PIL (I tested and cannot import Pillow but can import PIL) but still the same error when it attempts to automatically resize a photo:

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

What is the best way to install photologue on webfaction?

Photologue installs fine but then I get the following error when I try to add an image:

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

I haven't been able to turn up anything that appears similar and the docs refer to "strange bugs" and this seems like that. Any help is appreciated.

Thanks!

1

There are 1 answers

6
Raja Simon On

keep in mind tmp/ is a directory ..

This directory contains mostly files that are required temporarily

Access your dedicated server using terminal and access the folder using cd /tmp . After using touch to create new file

>touch PHOTOLOGUE_NO_PILLOW