losee losee - 28 days ago 15x
Git Question

Django app has a no ImportError: No module named 'django.core.context_processors'

Tried git pushing my app after tweaking it and got the following error.

ImportError: No module named 'django.core.context_processors'

this was not showing up in my heroku logs and my app works locally so I was confused. I had to set debug to true on the production side to finally figure this out. What can I do to clear this up?

this is some of the traceback

Request Method: GET
Request URL: http://hispanicheights.com/
Django Version: 1.10.1
Exception Type: ImportError
Exception Value:
No module named 'django.core.context_processors'
Exception Location: /app/.heroku/python/lib/python3.5/importlib/__init__.py in import_module, line 126
Python Executable: /app/.heroku/python/bin/python
Python Version: 3.5.1
Python Path:['/app',

I looked at line 126 and this is what's there

return _bootstrap._gcd_import(name[level:], package, level)



is no where to be found in the init file. I looked in my settings file for production and saw this

'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'APP_DIRS': True,
'debug': True,
'context_processors': [

am I supposed to modify this some how?


Try removing "django.core.context_processors.request" from your settings.

In Django 1.10 django.core.context_processors has been moved to django.template.context_processors. See the release notes

You already have the request context processors, no need to add it again with the wrong location.