python 3.4 and Django 1.8.3 PIL import issue -
i have django blog-type app articles. i'd attach images these articles. when try that, following error , traceback:
environment: request method: post request url: http://[site].com/admin/paper/article/1/ django version: 1.8.3 python version: 3.4.1 installed applications: ('sorl.thumbnail', 'django_mobile', 'event_ticker', 'paper', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles') installed middleware: ('django.contrib.sessions.middleware.sessionmiddleware', 'django_mobile.middleware.mobiledetectionmiddleware', 'django_mobile.middleware.setflavourmiddleware', 'django.middleware.common.commonmiddleware', 'django.middleware.csrf.csrfviewmiddleware', 'django.contrib.auth.middleware.authenticationmiddleware', 'django.contrib.auth.middleware.sessionauthenticationmiddleware', 'django.contrib.messages.middleware.messagemiddleware', 'django.middleware.clickjacking.xframeoptionsmiddleware', 'django.middleware.security.securitymiddleware') traceback: file "/home/me/webapps/bs/lib/python3.4/django-1.8.3-py3.4.egg/django/core/handlers/base.py" in get_response 132. response = wrapped_callback(request, *callback_args, **callback_kwargs) file "/home/me/webapps/bs/lib/python3.4/django-1.8.3-py3.4.egg/django/contrib/admin/options.py" in wrapper 616. return self.admin_site.admin_view(view)(*args, **kwargs) file "/home/me/webapps/bs/lib/python3.4/django-1.8.3-py3.4.egg/django/utils/decorators.py" in _wrapped_view 110. response = view_func(request, *args, **kwargs) file "/home/me/webapps/bs/lib/python3.4/django-1.8.3-py3.4.egg/django/views/decorators/cache.py" in _wrapped_view_func 57. response = view_func(request, *args, **kwargs) file "/home/me/webapps/bs/lib/python3.4/django-1.8.3-py3.4.egg/django/contrib/admin/sites.py" in inner 233. return view(request, *args, **kwargs) file "/home/me/webapps/bs/lib/python3.4/django-1.8.3-py3.4.egg/django/contrib/admin/options.py" in change_view 1519. return self.changeform_view(request, object_id, form_url, extra_context) file "/home/me/webapps/bs/lib/python3.4/django-1.8.3-py3.4.egg/django/utils/decorators.py" in _wrapper 34. return bound_func(*args, **kwargs) file "/home/me/webapps/bs/lib/python3.4/django-1.8.3-py3.4.egg/django/utils/decorators.py" in _wrapped_view 110. response = view_func(request, *args, **kwargs) file "/home/me/webapps/bs/lib/python3.4/django-1.8.3-py3.4.egg/django/utils/decorators.py" in bound_func 30. return func.__get__(self, type(self))(*args2, **kwargs2) file "/usr/local/lib/python3.4/contextlib.py" in inner 30. return func(*args, **kwds) file "/home/me/webapps/bs/lib/python3.4/django-1.8.3-py3.4.egg/django/contrib/admin/options.py" in changeform_view 1459. if form.is_valid(): file "/home/me/webapps/bs/lib/python3.4/django-1.8.3-py3.4.egg/django/forms/forms.py" in is_valid 184. return self.is_bound , not self.errors file "/home/me/webapps/bs/lib/python3.4/django-1.8.3-py3.4.egg/django/forms/forms.py" in errors 176. self.full_clean() file "/home/me/webapps/bs/lib/python3.4/django-1.8.3-py3.4.egg/django/forms/forms.py" in full_clean 392. self._clean_fields() file "/home/me/webapps/bs/lib/python3.4/django-1.8.3-py3.4.egg/django/forms/forms.py" in _clean_fields 405. value = field.clean(value, initial) file "/home/me/webapps/bs/lib/python3.4/django-1.8.3-py3.4.egg/django/forms/fields.py" in clean 644. return super(filefield, self).clean(data) file "/home/me/webapps/bs/lib/python3.4/django-1.8.3-py3.4.egg/django/forms/fields.py" in clean 162. value = self.to_python(value) file "/home/me/webapps/bs/lib/python3.4/django-1.8.3-py3.4.egg/django/forms/fields.py" in to_python 674. pil import image exception type: importerror @ /admin/paper/article/1/ exception value: no module named 'pil'
i running virtualenv, here's result of pip freeze
django==1.8.3 django-mobile==0.5.0 image==1.4.0 pbr==1.1.1 pillow==2.9.0 pillow-pil==0.1.dev0 psycopg2==2.6.1 six==1.9.0 sorl-thumbnail==12.3 stevedore==1.5.0 uwsgi==2.0.11 versiontools==1.9.1 virtualenv==13.0.3 virtualenv-clone==0.2.5 virtualenvwrapper==4.6.0 wheel==0.24.0
i provide million other details. don't have pil installed , can't install because virtualenv i'm using running python3.4, won't install pil correctly because it's old. when try install pil (using --allow-unverified option learned searching on here) error involving print
command.
i'm confused. thought django had dropped pil entirely? it's showing in django file required module? need use version of python install or missing extremely obvious?
Comments
Post a Comment