Forums

Cannot get django-compressor to work.

I've created a virtualenv and everything was working just fine until I installed django_compressor. I get the following error.

Nothing in django_compressor docs to indicate what is wrong. I checked the settings file and all.

2014-07-31 09:48:55,749 :Traceback (most recent call last):
2014-07-31 09:48:55,749 :  File "/usr/local/lib/python3.4/dist-packages/django/core/urlresolvers.py", line 358, in urlconf_module
2014-07-31 09:48:55,750 :    return self._urlconf_module
2014-07-31 09:48:55,750 :AttributeError: 'RegexURLResolver' object has no attribute '_urlconf_module'
2014-07-31 09:48:55,750 :
2014-07-31 09:48:55,750 :During handling of the above exception, another exception occurred:
2014-07-31 09:48:55,750 :
2014-07-31 09:48:55,750 :Traceback (most recent call last):
2014-07-31 09:48:55,750 :  File "/usr/local/lib/python3.4/dist-packages/django/core/handlers/base.py", line 99, in get_response
2014-07-31 09:48:55,751 :    resolver_match = resolver.resolve(request.path_info)
2014-07-31 09:48:55,751 :  File "/usr/local/lib/python3.4/dist-packages/django/core/urlresolvers.py", line 337, in resolve
2014-07-31 09:48:55,751 :    for pattern in self.url_patterns:
2014-07-31 09:48:55,751 :  File "/usr/local/lib/python3.4/dist-packages/django/core/urlresolvers.py", line 365, in url_patterns
2014-07-31 09:48:55,751 :    patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
2014-07-31 09:48:55,751 :  File "/usr/local/lib/python3.4/dist-packages/django/core/urlresolvers.py", line 360, in urlconf_module
2014-07-31 09:48:55,752 :    self._urlconf_module = import_module(self.urlconf_name)
2014-07-31 09:48:55,752 :  File "/usr/lib/python3.4/importlib/__init__.py", line 109, in import_module
2014-07-31 09:48:55,752 :    return _bootstrap._gcd_import(name[level:], package, level)
2014-07-31 09:48:55,752 :  File "<frozen importlib._bootstrap>", line 2254, in _gcd_import
2014-07-31 09:48:55,754 :  File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
2014-07-31 09:48:55,754 :  File "<frozen importlib._bootstrap>", line 2226, in _find_and_load_unlocked
2014-07-31 09:48:55,754 :  File "<frozen importlib._bootstrap>", line 1200, in _load_unlocked
2014-07-31 09:48:55,755 :  File "<frozen importlib._bootstrap>", line 1129, in _exec
2014-07-31 09:48:55,755 :  File "<frozen importlib._bootstrap>", line 1471, in exec_module
2014-07-31 09:48:55,755 :  File "<frozen importlib._bootstrap>", line 321, in _call_with_frames_removed
2014-07-31 09:48:55,755 :  File "/home/tweeppm/innovative/innovative/urls.py", line 5, in <module>
2014-07-31 09:48:55,756 :    admin.autodiscover()
2014-07-31 09:48:55,756 :  File "/usr/local/lib/python3.4/dist-packages/django/contrib/admin/__init__.py", line 25, in autodiscover
2014-07-31 09:48:55,756 :    mod = import_module(app)
2014-07-31 09:48:55,756 :  File "/usr/lib/python3.4/importlib/__init__.py", line 109, in import_module
2014-07-31 09:48:55,757 :    return _bootstrap._gcd_import(name[level:], package, level)
2014-07-31 09:48:55,757 :  File "<frozen importlib._bootstrap>", line 2254, in _gcd_import
2014-07-31 09:48:55,757 :  File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
2014-07-31 09:48:55,757 :  File "<frozen importlib._bootstrap>", line 2224, in _find_and_load_unlocked
2014-07-31 09:48:55,758 :ImportError: No module named 'compressor'
2014-07-31 09:48:55,758 :
2014-07-31 09:48:55,758 :During handling of the above exception, another exception occurred:
2014-07-31 09:48:55,758 :
2014-07-31 09:48:55,758 :Traceback (most recent call last):
2014-07-31 09:48:55,758 :  File "/usr/local/lib/python3.4/dist-packages/django/template/defaultfilters.py", line 702, in date
2014-07-31 09:48:55,765 :    return formats.date_format(value, arg)
2014-07-31 09:48:55,765 :  File "/usr/local/lib/python3.4/dist-packages/django/utils/formats.py", line 119, in date_format
2014-07-31 09:48:55,774 :    return dateformat.format(value, get_format(format or 'DATE_FORMAT', use_l10n=use_l10n))
2014-07-31 09:48:55,774 :  File "/usr/local/lib/python3.4/dist-packages/django/utils/formats.py", line 92, in get_format
2014-07-31 09:48:55,774 :    return getattr(settings, format_type)
2014-07-31 09:48:55,774 :  File "/usr/local/lib/python3.4/dist-packages/django/conf/__init__.py", line 55, in __getattr__
2014-07-31 09:48:55,780 :    return getattr(self._wrapped, name)
2014-07-31 09:48:55,780 :AttributeError: 'Settings' object has no attribute 'r'
2014-07-31 09:48:55,781 :
2014-07-31 09:48:55,781 :During handling of the above exception, another exception occurred:
2014-07-31 09:48:55,781 :
2014-07-31 09:48:55,781 :Traceback (most recent call last):
2014-07-31 09:48:55,781 :  File "/bin/user_wsgi_wrapper.py", line 67, in __call__
2014-07-31 09:48:55,781 :    self.error_log_file.logger.exception("Error running WSGI application")
2014-07-31 09:48:55,781 :  File "/usr/lib/python3.4/logging/__init__.py", line 1303, in exception
2014-07-31 09:48:55,803 :    self.error(msg, *args, **kwargs)
2014-07-31 09:48:55,803 :  File "/usr/lib/python3.4/logging/__init__.py", line 1296, in error
2014-07-31 09:48:55,804 :    self._log(ERROR, msg, args, **kwargs)
2014-07-31 09:48:55,804 :  File "/usr/lib/python3.4/logging/__init__.py", line 1402, in _log
2014-07-31 09:48:55,804 :    self.handle(record)
2014-07-31 09:48:55,805 :  File "/usr/lib/python3.4/logging/__init__.py", line 1411, in handle
2014-07-31 09:48:55,805 :    if (not self.disabled) and self.filter(record):
2014-07-31 09:48:55,805 :  File "/usr/lib/python3.4/logging/__init__.py", line 699, in filter
2014-07-31 09:48:55,806 :    for f in self.filters:
2014-07-31 09:48:55,806 :  File "/bin/user_wsgi_wrapper.py", line 59, in __call__
2014-07-31 09:48:55,806 :    app_iterator = self.app(environ, start_response)
2014-07-31 09:48:55,806 :  File "/usr/local/lib/python3.4/dist-packages/django/core/handlers/wsgi.py", line 206, in __call__
2014-07-31 09:48:55,813 :    response = self.get_response(request)
2014-07-31 09:48:55,813 :  File "/usr/local/lib/python3.4/dist-packages/django/core/handlers/base.py", line 194, in get_response
2014-07-31 09:48:55,813 :    response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
2014-07-31 09:48:55,814 :  File "/usr/local/lib/python3.4/dist-packages/django/core/handlers/base.py", line 229, in handle_uncaught_exception
2014-07-31 09:48:55,814 :    return debug.technical_500_response(request, *exc_info)
2014-07-31 09:48:55,814 :  File "/usr/local/lib/python3.4/dist-packages/django/views/debug.py", line 69, in technical_500_response
2014-07-31 09:48:55,816 :    html = reporter.get_traceback_html()
2014-07-31 09:48:55,816 :  File "/usr/local/lib/python3.4/dist-packages/django/views/debug.py", line 324, in get_traceback_html
2014-07-31 09:48:55,816 :    return t.render(c)
2014-07-31 09:48:55,816 :  File "/usr/local/lib/python3.4/dist-packages/django/template/base.py", line 140, in render
2014-07-31 09:48:55,816 :    return self._render(context)
2014-07-31 09:48:55,817 :  File "/usr/local/lib/python3.4/dist-packages/django/template/base.py", line 134, in _render
2014-07-31 09:48:55,817 :    return self.nodelist.render(context)
2014-07-31 09:48:55,817 :  File "/usr/local/lib/python3.4/dist-packages/django/template/base.py", line 840, in render
2014-07-31 09:48:55,817 :    bit = self.render_node(node, context)
2014-07-31 09:48:55,817 :  File "/usr/local/lib/python3.4/dist-packages/django/template/debug.py", line 78, in render_node
2014-07-31 09:48:55,818 :    return node.render(context)
2014-07-31 09:48:55,818 :  File "/usr/local/lib/python3.4/dist-packages/django/template/debug.py", line 88, in render
2014-07-31 09:48:55,818 :    output = self.filter_expression.resolve(context)
2014-07-31 09:48:55,818 :  File "/usr/local/lib/python3.4/dist-packages/django/template/base.py", line 613, in resolve
2014-07-31 09:48:55,818 :    new_obj = func(obj, *arg_vals)
2014-07-31 09:48:55,818 :  File "/usr/local/lib/python3.4/dist-packages/django/template/defaultfilters.py", line 705, in date
2014-07-31 09:48:55,819 :    return format(value, arg)
2014-07-31 09:48:55,819 :  File "/usr/local/lib/python3.4/dist-packages/django/utils/dateformat.py", line 312, in format
2014-07-31 09:48:55,820 :    return df.format(format_string)
2014-07-31 09:48:55,820 :  File "/usr/local/lib/python3.4/dist-packages/django/utils/dateformat.py", line 35, in format
2014-07-31 09:48:55,820 :    pieces.append(force_text(getattr(self, piece)()))
2014-07-31 09:48:55,820 :  File "/usr/local/lib/python3.4/dist-packages/django/utils/dateformat.py", line 216, in r
2014-07-31 09:48:55,820 :    return self.format('D, j M Y H:i:s O')
2014-07-31 09:48:55,820 :  File "/usr/local/lib/python3.4/dist-packages/django/utils/dateformat.py", line 35, in format
2014-07-31 09:48:55,820 :    pieces.append(force_text(getattr(self, piece)()))
2014-07-31 09:48:55,820 :  File "/usr/local/lib/python3.4/dist-packages/django/utils/encoding.py", line 106, in force_text
2014-07-31 09:48:55,821 :    s = six.text_type(s)
2014-07-31 09:48:55,821 :  File "/usr/local/lib/python3.4/dist-packages/django/utils/functional.py", line 138, in __text_cast
2014-07-31 09:48:55,823 :    return func(*self.__args, **self.__kw)
2014-07-31 09:48:55,823 :  File "/usr/local/lib/python3.4/dist-packages/django/utils/translation/__init__.py", line 76, in ugettext
2014-07-31 09:48:55,837 :    return _trans.ugettext(message)
2014-07-31 09:48:55,837 :  File "/usr/local/lib/python3.4/dist-packages/django/utils/translation/trans_real.py", line 275, in gettext
2014-07-31 09:48:55,838 :    return do_translate(message, 'gettext')
2014-07-31 09:48:55,838 :  File "/usr/local/lib/python3.4/dist-packages/django/utils/translation/trans_real.py", line 263, in do_translate
2014-07-31 09:48:55,839 :    _default = translation(settings.LANGUAGE_CODE)
2014-07-31 09:48:55,839 :  File "/usr/local/lib/python3.4/dist-packages/django/utils/translation/trans_real.py", line 177, in translation
2014-07-31 09:48:55,839 :    default_translation = _fetch(settings.LANGUAGE_CODE)
2014-07-31 09:48:55,839 :  File "/usr/local/lib/python3.4/dist-packages/django/utils/translation/trans_real.py", line 159, in _fetch
2014-07-31 09:48:55,839 :    app = import_module(appname)
2014-07-31 09:48:55,839 :  File "/usr/lib/python3.4/importlib/__init__.py", line 109, in import_module
2014-07-31 09:48:55,839 :    return _bootstrap._gcd_import(name[level:], package, level)
2014-07-31 09:48:55,840 :  File "<frozen importlib._bootstrap>", line 2254, in _gcd_import
2014-07-31 09:48:55,840 :  File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
2014-07-31 09:48:55,840 :  File "<frozen importlib._bootstrap>", line 2224, in _find_and_load_unlocked
2014-07-31 09:48:55,840 :ImportError: No module named 'compressor'
2014-07-31 09:48:56,828 :Traceback (most recent call last):
2014-07-31 09:48:56,868 :  File "/usr/local/lib/python3.4/dist-packages/django/core/urlresolvers.py", line 358, in urlconf_module
2014-07-31 09:48:56,868 :    return self._urlconf_module
2014-07-31 09:48:56,868 :AttributeError: 'RegexURLResolver' object has no attribute '_urlconf_module'
2014-07-31 09:48:56,868 :
2014-07-31 09:48:56,869 :During handling of the above exception, another exception occurred:
2014-07-31 09:48:56,869 :
2014-07-31 09:48:56,869 :Traceback (most recent call last):
2014-07-31 09:48:56,869 :  File "/usr/local/lib/python3.4/dist-packages/django/core/handlers/base.py", line 88, in get_response
2014-07-31 09:48:56,869 :    response = middleware_method(request)
2014-07-31 09:48:56,869 :  File "/usr/local/lib/python3.4/dist-packages/django/middleware/common.py", line 71, in process_request
2014-07-31 09:48:56,869 :    if (not urlresolvers.is_valid_path(request.path_info, urlconf) and
2014-07-31 09:48:56,869 :  File "/usr/local/lib/python3.4/dist-packages/django/core/urlresolvers.py", line 596, in is_valid_path
2014-07-31 09:48:56,870 :    resolve(path, urlconf)
2014-07-31 09:48:56,870 :  File "/usr/local/lib/python3.4/dist-packages/django/core/urlresolvers.py", line 476, in resolve
2014-07-31 09:48:56,870 :    return get_resolver(urlconf).resolve(path)
2014-07-31 09:48:56,870 :  File "/usr/local/lib/python3.4/dist-packages/django/core/urlresolvers.py", line 337, in resolve
2014-07-31 09:48:56,870 :    for pattern in self.url_patterns:
2014-07-31 09:48:56,870 :  File "/usr/local/lib/python3.4/dist-packages/django/core/urlresolvers.py", line 365, in url_patterns
2014-07-31 09:48:56,871 :    patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
2014-07-31 09:48:56,871 :  File "/usr/local/lib/python3.4/dist-packages/django/core/urlresolvers.py", line 360, in urlconf_module
2014-07-31 09:48:56,871 :    self._urlconf_module = import_module(self.urlconf_name)
2014-07-31 09:48:56,871 :  File "/usr/lib/python3.4/importlib/__init__.py", line 109, in import_module
2014-07-31 09:48:56,871 :    return _bootstrap._gcd_import(name[level:], package, level)
2014-07-31 09:48:56,871 :  File "<frozen importlib._bootstrap>", line 2254, in _gcd_import
2014-07-31 09:48:56,872 :  File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
2014-07-31 09:48:56,872 :  File "<frozen importlib._bootstrap>", line 2226, in _find_and_load_unlocked
2014-07-31 09:48:56,872 :  File "<frozen importlib._bootstrap>", line 1200, in _load_unlocked
2014-07-31 09:48:56,872 :  File "<frozen importlib._bootstrap>", line 1129, in _exec
2014-07-31 09:48:56,873 :  File "<frozen importlib._bootstrap>", line 1471, in exec_module
2014-07-31 09:48:56,873 :  File "<frozen importlib._bootstrap>", line 321, in _call_with_frames_removed
2014-07-31 09:48:56,873 :  File "/home/tweeppm/innovative/innovative/urls.py", line 5, in <module>
2014-07-31 09:48:56,874 :    admin.autodiscover()
2014-07-31 09:48:56,874 :  File "/usr/local/lib/python3.4/dist-packages/django/contrib/admin/__init__.py", line 29, in autodiscover
2014-07-31 09:48:56,874 :    import_module('%s.admin' % app)
2014-07-31 09:48:56,874 :  File "/usr/lib/python3.4/importlib/__init__.py", line 109, in import_module
2014-07-31 09:48:56,874 :    return _bootstrap._gcd_import(name[level:], package, level)
2014-07-31 09:48:56,875 :  File "<frozen importlib._bootstrap>", line 2254, in _gcd_import
2014-07-31 09:48:56,875 :  File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
2014-07-31 09:48:56,875 :  File "<frozen importlib._bootstrap>", line 2226, in _find_and_load_unlocked
2014-07-31 09:48:56,875 :  File "<frozen importlib._bootstrap>", line 1200, in _load_unlocked
2014-07-31 09:48:56,876 :  File "<frozen importlib._bootstrap>", line 1129, in _exec
2014-07-31 09:48:56,876 :  File "<frozen importlib._bootstrap>", line 1471, in exec_module
2014-07-31 09:48:56,876 :  File "<frozen importlib._bootstrap>", line 321, in _call_with_frames_removed
2014-07-31 09:48:56,876 :  File "/usr/local/lib/python3.4/dist-packages/django/contrib/auth/admin.py", line 182, in <module>
2014-07-31 09:48:56,877 :    admin.site.register(Group, GroupAdmin)
2014-07-31 09:48:56,877 :  File "/usr/local/lib/python3.4/dist-packages/django/contrib/admin/sites.py", line 92, in register
2014-07-31 09:48:56,877 :    admin_class.validate(model)
2014-07-31 09:48:56,877 :  File "/usr/local/lib/python3.4/dist-packages/django/contrib/admin/options.py", line 105, in validate
2014-07-31 09:48:56,877 :    validator = cls.validator_class()
2014-07-31 09:48:56,877 :  File "/usr/local/lib/python3.4/dist-packages/django/contrib/admin/validation.py", line 20, in __init__
2014-07-31 09:48:56,877 :    models.get_apps()
2014-07-31 09:48:56,878 :  File "/usr/local/lib/python3.4/dist-packages/django/db/models/loading.py", line 139, in get_apps
2014-07-31 09:48:56,878 :    self._populate()
2014-07-31 09:48:56,878 :  File "/usr/local/lib/python3.4/dist-packages/django/db/models/loading.py", line 75, in _populate
2014-07-31 09:48:56,878 :    self.load_app(app_name, True)
2014-07-31 09:48:56,878 :  File "/usr/local/lib/python3.4/dist-packages/django/db/models/loading.py", line 97, in load_app
2014-07-31 09:48:56,878 :    app_module = import_module(app_name)
2014-07-31 09:48:56,878 :  File "/usr/lib/python3.4/importlib/__init__.py", line 109, in import_module
2014-07-31 09:48:56,879 :    return _bootstrap._gcd_import(name[level:], package, level)
2014-07-31 09:48:56,879 :  File "<frozen importlib._bootstrap>", line 2254, in _gcd_import
2014-07-31 09:48:56,879 :  File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
2014-07-31 09:48:56,879 :  File "<frozen importlib._bootstrap>", line 2224, in _find_and_load_unlocked
2014-07-31 09:48:56,879 :ImportError: No module named 'compressor'
2014-07-31 09:48:56,879 :
2014-07-31 09:48:56,880 :During handling of the above exception, another exception occurred:
2014-07-31 09:48:56,880 :
2014-07-31 09:48:56,880 :Traceback (most recent call last):
2014-07-31 09:48:56,880 :  File "/usr/local/lib/python3.4/dist-packages/django/template/defaultfilters.py", line 702, in date
2014-07-31 09:48:56,880 :    return formats.date_format(value, arg)
2014-07-31 09:48:56,880 :  File "/usr/local/lib/python3.4/dist-packages/django/utils/formats.py", line 119, in date_format
2014-07-31 09:48:56,880 :    return dateformat.format(value, get_format(format or 'DATE_FORMAT', use_l10n=use_l10n))
2014-07-31 09:48:56,880 :  File "/usr/local/lib/python3.4/dist-packages/django/utils/formats.py", line 107, in get_format
2014-07-31 09:48:56,881 :    return getattr(settings, format_type)
2014-07-31 09:48:56,881 :  File "/usr/local/lib/python3.4/dist-packages/django/conf/__init__.py", line 55, in __getattr__
2014-07-31 09:48:56,881 :    return getattr(self._wrapped, name)
2014-07-31 09:48:56,881 :AttributeError: 'Settings' object has no attribute 'r'
2014-07-31 09:48:56,881 :
2014-07-31 09:48:56,881 :During handling of the above exception, another exception occurred:
2014-07-31 09:48:56,881 :
2014-07-31 09:48:56,881 :Traceback (most recent call last):
2014-07-31 09:48:56,881 :  File "/bin/user_wsgi_wrapper.py", line 67, in __call__
2014-07-31 09:48:56,881 :    self.error_log_file.logger.exception("Error running WSGI application")
2014-07-31 09:48:56,882 :  File "/usr/lib/python3.4/logging/__init__.py", line 1303, in exception
2014-07-31 09:48:56,882 :    self.error(msg, *args, **kwargs)
2014-07-31 09:48:56,882 :  File "/usr/lib/python3.4/logging/__init__.py", line 1296, in error
2014-07-31 09:48:56,883 :    self._log(ERROR, msg, args, **kwargs)
2014-07-31 09:48:56,883 :  File "/usr/lib/python3.4/logging/__init__.py", line 1402, in _log
2014-07-31 09:48:56,883 :    self.handle(record)
2014-07-31 09:48:56,884 :  File "/usr/lib/python3.4/logging/__init__.py", line 1411, in handle
2014-07-31 09:48:56,884 :    if (not self.disabled) and self.filter(record):
2014-07-31 09:48:56,884 :  File "/usr/lib/python3.4/logging/__init__.py", line 699, in filter
2014-07-31 09:48:56,885 :    for f in self.filters:
2014-07-31 09:48:56,885 :  File "/bin/user_wsgi_wrapper.py", line 59, in __call__
2014-07-31 09:48:56,885 :    app_iterator = self.app(environ, start_response)
2014-07-31 09:48:56,885 :  File "/usr/local/lib/python3.4/dist-packages/django/core/handlers/wsgi.py", line 206, in __call__
2014-07-31 09:48:56,885 :    response = self.get_response(request)
2014-07-31 09:48:56,885 :  File "/usr/local/lib/python3.4/dist-packages/django/core/handlers/base.py", line 194, in get_response
2014-07-31 09:48:56,885 :    response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
2014-07-31 09:48:56,886 :  File "/usr/local/lib/python3.4/dist-packages/django/core/handlers/base.py", line 229, in handle_uncaught_exception
2014-07-31 09:48:56,886 :    return debug.technical_500_response(request, *exc_info)
2014-07-31 09:48:56,886 :  File "/usr/local/lib/python3.4/dist-packages/django/views/debug.py", line 69, in technical_500_response
2014-07-31 09:48:56,886 :    html = reporter.get_traceback_html()
2014-07-31 09:48:56,886 :  File "/usr/local/lib/python3.4/dist-packages/django/views/debug.py", line 324, in get_traceback_html
2014-07-31 09:48:56,886 :    return t.render(c)
2014-07-31 09:48:56,886 :  File "/usr/local/lib/python3.4/dist-packages/django/template/base.py", line 140, in render
2014-07-31 09:48:56,887 :    return self._render(context)
2014-07-31 09:48:56,887 :  File "/usr/local/lib/python3.4/dist-packages/django/template/base.py", line 134, in _render
2014-07-31 09:48:56,887 :    return self.nodelist.render(context)
2014-07-31 09:48:56,887 :  File "/usr/local/lib/python3.4/dist-packages/django/template/base.py", line 840, in render
2014-07-31 09:48:56,887 :    bit = self.render_node(node, context)
2014-07-31 09:48:56,887 :  File "/usr/local/lib/python3.4/dist-packages/django/template/debug.py", line 78, in render_node
2014-07-31 09:48:56,888 :    return node.render(context)
2014-07-31 09:48:56,888 :  File "/usr/local/lib/python3.4/dist-packages/django/template/debug.py", line 88, in render
2014-07-31 09:48:56,888 :    output = self.filter_expression.resolve(context)
2014-07-31 09:48:56,888 :  File "/usr/local/lib/python3.4/dist-packages/django/template/base.py", line 613, in resolve
2014-07-31 09:48:56,888 :    new_obj = func(obj, *arg_vals)
2014-07-31 09:48:56,888 :  File "/usr/local/lib/python3.4/dist-packages/django/template/defaultfilters.py", line 705, in date
2014-07-31 09:48:56,889 :    return format(value, arg)
2014-07-31 09:48:56,889 :  File "/usr/local/lib/python3.4/dist-packages/django/utils/dateformat.py", line 312, in format
2014-07-31 09:48:56,889 :    return df.format(format_string)
2014-07-31 09:48:56,889 :  File "/usr/local/lib/python3.4/dist-packages/django/utils/dateformat.py", line 35, in format
2014-07-31 09:48:56,889 :    pieces.append(force_text(getattr(self, piece)()))
2014-07-31 09:48:56,889 :  File "/usr/local/lib/python3.4/dist-packages/django/utils/dateformat.py", line 216, in r
2014-07-31 09:48:56,890 :    return self.format('D, j M Y H:i:s O')
2014-07-31 09:48:56,890 :  File "/usr/local/lib/python3.4/dist-packages/django/utils/dateformat.py", line 35, in format
2014-07-31 09:48:56,890 :    pieces.append(force_text(getattr(self, piece)()))
2014-07-31 09:48:56,890 :  File "/usr/local/lib/python3.4/dist-packages/django/utils/encoding.py", line 106, in force_text
2014-07-31 09:48:56,890 :    s = six.text_type(s)
2014-07-31 09:48:56,890 :  File "/usr/local/lib/python3.4/dist-packages/django/utils/functional.py", line 138, in __text_cast
2014-07-31 09:48:56,890 :    return func(*self.__args, **self.__kw)
2014-07-31 09:48:56,891 :  File "/usr/local/lib/python3.4/dist-packages/django/utils/translation/__init__.py", line 76, in ugettext
2014-07-31 09:48:56,891 :    return _trans.ugettext(message)
2014-07-31 09:48:56,891 :  File "/usr/local/lib/python3.4/dist-packages/django/utils/translation/trans_real.py", line 275, in gettext
2014-07-31 09:48:56,891 :    return do_translate(message, 'gettext')
2014-07-31 09:48:56,891 :  File "/usr/local/lib/python3.4/dist-packages/django/utils/translation/trans_real.py", line 263, in do_translate
2014-07-31 09:48:56,891 :    _default = translation(settings.LANGUAGE_CODE)
2014-07-31 09:48:56,891 :  File "/usr/local/lib/python3.4/dist-packages/django/utils/translation/trans_real.py", line 177, in translation
2014-07-31 09:48:56,892 :    default_translation = _fetch(settings.LANGUAGE_CODE)
2014-07-31 09:48:56,892 :  File "/usr/local/lib/python3.4/dist-packages/django/utils/translation/trans_real.py", line 159, in _fetch
2014-07-31 09:48:56,892 :    app = import_module(appname)
2014-07-31 09:48:56,892 :  File "/usr/lib/python3.4/importlib/__init__.py", line 109, in import_module
2014-07-31 09:48:56,892 :    return _bootstrap._gcd_import(name[level:], package, level)
2014-07-31 09:48:56,892 :  File "<frozen importlib._bootstrap>", line 2254, in _gcd_import
2014-07-31 09:48:56,893 :  File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
2014-07-31 09:48:56,893 :  File "<frozen importlib._bootstrap>", line 2224, in _find_and_load_unlocked
2014-07-31 09:48:56,893 :ImportError: No module named 'compressor'

It's hard to read that traceback -- have a look at the link below for how to format your post with markdown -- but, from what I can tell, that traceback wasn't using a virtualenv?

Yes, without even going into the detailed traceback, that's the thick of it.

I followed the FAQ to the letter to setup virtualenv. When I run:

which pip

which python

both of them point to ~/.virtualenvs/django17/bin/pip or ~/.virtualenvs/django17/bin/python.

I don't understand why the server is running the python3 for the system wide installation.

Have you put the virtualenv initialisation code in your wsgi.py?

It'll look something like:

activate_this = '/home/virtualenvdemo/.virtualenvs/django16/bin/activate_this.py'
execfile(activate_this, dict(__file__=activate_this))

import os
import sys

path = '/home/virtualenvdemo/mysite'
if path not in sys.path:
    sys.path.append(path)
os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings'

import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()

Yeah, here's what my wsgi file looks like:

activate_this = '/home/tweeppm/.virtualenvs/django17/bin/activate_this.py'
with open(activate_this) as f:
    code = compile(f.read(), activate_this, 'exec')
    exec(code, dict(__file__=activate_this))

import os
import sys

path = '/home/tweeppm/innovative'
if path not in sys.path:
    sys.path.append(path)
os.environ['DJANGO_SETTINGS_MODULE'] = 'innovative.settings'

import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()

I then checked whether the WSGI files imports path correctly by running it interactively, and then identifying the location of the problematic module (compressor) in question:

python -i /var/www/www_innovativeadventures_co_wsgi.py
import compressor                                                                                                            
print(compressor)                                                                                                            
<module 'compressor' from '/home/tweeppm/.virtualenvs/django17/local/lib/python2.7/site-packages/compressor/__init__.pyc'>

What does this mean? Why is the server running the system-wide python instead of the virtualenv I've setup?

Marking this as fixed. But not exactly sure it'll work on python3.4.

I deleted the web-app from Dashboard, and reconfigured the virtualenv to work on python 2.7. Although everything installed correctly, I noticed that i couldn't import compressor any longer. Turns out that the application name to use in settings.py is 'compress' - not 'compressor'.

Turns out that the application name to use in settings.py is 'compress' - not 'compressor'.

Do you think that was the explanation all along then?

I'll never know what was wrong with the Python3 environment. As far as I know, the deployed site was looking in the system-wide python distribution instead of the virtualenv I'd set up.

I had an issue with that on one of my test virtualenvs. I'm still new to python so maybe it was something else, but I found when I did python django-admin createproject instead of just django-admin createproject it worked with the virtual env instead of the system python. Same with startapp. For whatever reasonwhen NOT using the leading python call *.py files are being sent to system installation instead of virtualenv.

sounds like it's about hashbangs. If your hashbang in your python file says:

1
#!/usr/bin/python

Then it will always use the system python if you try to execute it directly.

The virtualenv-compatible hashbang is as follows:

1
#!/usr/bin/env python

re django-admin, is there a difference with django-admin.py? Try:

which django-admin
which django-admin.py

from inside a virtualenv...

Harry/meteorainer,

Great! I almost forgot about the significance of the hash bangs. I am sure this will help people who've had similar issues.

You can install the compressor for Python3.5:

pip3.5 install django-compressor --user