I developed application that uses an ImageField in Django==2.0.7 with Pillow 5.2.0 there is no issue on development machine but facing problem on production server giving "Server Error 500"
-- Exception Value: No module named 'PIL' which I have not used or called in my code. I new to Python and Django but seems to me is Django or Pillow problem. If I am not wrong.
the following DEBUG=False production detail
Internal Server Error: /admin/vv/institutes/add/
ModuleNotFoundError at /admin/vv/institutes/add/
No module named 'PIL'
Request Method: POST
Django Version: 2.0.7
Python Executable: /usr/local/bin/python3
Python Version: 3.6.6
Python Path: ['/home/asifkhan69/webapps/rmsapp', '/home/asifkhan69/webapps/rmsapp/src', '/home/asifkhan69/webapps/rmsapp/lib/python3.6', '/home/asifkhan69/webapps/rmsapp/lib/python3.6/Django-2.0.7-py3.6.egg', '/home/asifkhan69/webapps/rmsapp/lib/python3.6/pytz-2018.5-py3.6.egg', '/usr/local/lib/python36.zip', '/usr/local/lib/python3.6', '/usr/local/lib/python3.6/lib-dynload', '/usr/local/lib/python3.6/site-packages']
Server time: Sat, 21 Jul 2018 13:16:26 +0000
Installed Applications:
['django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'accounts',
'vv']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
'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/asifkhan69/webapps/rmsapp/lib/python3.6/Django-2.0.7-py3.6.egg/django/core/handlers/exception.py" in inner
35. response = get_response(request)
File "/home/asifkhan69/webapps/rmsapp/lib/python3.6/Django-2.0.7-py3.6.egg/django/core/handlers/base.py" in _get_response
128. response = self.process_exception_by_middleware(e, request)
File "/home/asifkhan69/webapps/rmsapp/lib/python3.6/Django-2.0.7-py3.6.egg/django/core/handlers/base.py" in _get_response
126. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/asifkhan69/webapps/rmsapp/lib/python3.6/Django-2.0.7-py3.6.egg/django/contrib/admin/options.py" in wrapper
575. return self.admin_site.admin_view(view)(*args, **kwargs)
File "/home/asifkhan69/webapps/rmsapp/lib/python3.6/Django-2.0.7-py3.6.egg/django/utils/decorators.py" in _wrapped_view
142. response = view_func(request, *args, **kwargs)
File "/home/asifkhan69/webapps/rmsapp/lib/python3.6/Django-2.0.7-py3.6.egg/django/views/decorators/cache.py" in _wrapped_view_func
44. response = view_func(request, *args, **kwargs)
File "/home/asifkhan69/webapps/rmsapp/lib/python3.6/Django-2.0.7-py3.6.egg/django/contrib/admin/sites.py" in inner
223. return view(request, *args, **kwargs)
File "/home/asifkhan69/webapps/rmsapp/lib/python3.6/Django-2.0.7-py3.6.egg/django/contrib/admin/options.py" in add_view
1554. return self.changeform_view(request, None, form_url, extra_context)
File "/home/asifkhan69/webapps/rmsapp/lib/python3.6/Django-2.0.7-py3.6.egg/django/utils/decorators.py" in _wrapper
62. return bound_func(*args, **kwargs)
File "/home/asifkhan69/webapps/rmsapp/lib/python3.6/Django-2.0.7-py3.6.egg/django/utils/decorators.py" in _wrapped_view
142. response = view_func(request, *args, **kwargs)
File "/home/asifkhan69/webapps/rmsapp/lib/python3.6/Django-2.0.7-py3.6.egg/django/utils/decorators.py" in bound_func
58. return func.__get__(self, type(self))(*args2, **kwargs2)
File "/home/asifkhan69/webapps/rmsapp/lib/python3.6/Django-2.0.7-py3.6.egg/django/contrib/admin/options.py" in changeform_view
1451. return self._changeform_view(request, object_id, form_url, extra_context)
File "/home/asifkhan69/webapps/rmsapp/lib/python3.6/Django-2.0.7-py3.6.egg/django/contrib/admin/options.py" in _changeform_view
1483. if form.is_valid():
File "/home/asifkhan69/webapps/rmsapp/lib/python3.6/Django-2.0.7-py3.6.egg/django/forms/forms.py" in is_valid
179. return self.is_bound and not self.errors
File "/home/asifkhan69/webapps/rmsapp/lib/python3.6/Django-2.0.7-py3.6.egg/django/forms/forms.py" in errors
174. self.full_clean()
File "/home/asifkhan69/webapps/rmsapp/lib/python3.6/Django-2.0.7-py3.6.egg/django/forms/forms.py" in full_clean
376. self._clean_fields()
File "/home/asifkhan69/webapps/rmsapp/lib/python3.6/Django-2.0.7-py3.6.egg/django/forms/forms.py" in _clean_fields
392. value = field.clean(value, initial)
File "/home/asifkhan69/webapps/rmsapp/lib/python3.6/Django-2.0.7-py3.6.egg/django/forms/fields.py" in clean
578. return super().clean(data)
File "/home/asifkhan69/webapps/rmsapp/lib/python3.6/Django-2.0.7-py3.6.egg/django/forms/fields.py" in clean
148. value = self.to_python(value)
File "/home/asifkhan69/webapps/rmsapp/lib/python3.6/Django-2.0.7-py3.6.egg/django/forms/fields.py" in to_python
611. from PIL import Image
Exception Type: ModuleNotFoundError at /admin/vv/institutes/add/
Exception Value: No module named 'PIL'
Request information:
USER: asifkhan
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/7327dfc6-b28c-4347-96c0-34e9de632ac9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment