{"action":"opened","issue":{"url":"https://api.github.com/repos/django-compressor/django-compressor/issues/917","repository_url":"https://api.github.com/repos/django-compressor/django-compressor","labels_url":"https://api.github.com/repos/django-compressor/django-compressor/issues/917/labels{/name}","comments_url":"https://api.github.com/repos/django-compressor/django-compressor/issues/917/comments","events_url":"https://api.github.com/repos/django-compressor/django-compressor/issues/917/events","html_url":"https://github.com/django-compressor/django-compressor/issues/917","id":356207522,"node_id":"MDU6SXNzdWUzNTYyMDc1MjI=","number":917,"title":"Syntax err from get_cachekey()","user":{"login":"ChrisBolman","id":1119410,"node_id":"MDQ6VXNlcjExMTk0MTA=","avatar_url":"https://avatars3.githubusercontent.com/u/1119410?v=4","gravatar_id":"","url":"https://api.github.com/users/ChrisBolman","html_url":"https://github.com/ChrisBolman","followers_url":"https://api.github.com/users/ChrisBolman/followers","following_url":"https://api.github.com/users/ChrisBolman/following{/other_user}","gists_url":"https://api.github.com/users/ChrisBolman/gists{/gist_id}","starred_url":"https://api.github.com/users/ChrisBolman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChrisBolman/subscriptions","organizations_url":"https://api.github.com/users/ChrisBolman/orgs","repos_url":"https://api.github.com/users/ChrisBolman/repos","events_url":"https://api.github.com/users/ChrisBolman/events{/privacy}","received_events_url":"https://api.github.com/users/ChrisBolman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-01T14:42:08Z","updated_at":"2018-09-01T14:42:08Z","closed_at":null,"author_association":"NONE","body":"trying to get a project set up with compressor and the app is throwing `SyntaxError at / invalid syntax (cache.py, line 42)` err on any view request. \r\n\r\n`Installed Middleware:\r\n['djangosecure.middleware.SecurityMiddleware',\r\n 'project.utils.middleware.SiteMiddleware',\r\n 'django.contrib.sessions.middleware.SessionMiddleware',\r\n 'corsheaders.middleware.CorsMiddleware',\r\n 'project.utils.middleware.HoneypotMiddleware',\r\n 'django.middleware.common.CommonMiddleware',\r\n 'django.middleware.csrf.CsrfViewMiddleware',\r\n 'django.contrib.auth.middleware.AuthenticationMiddleware',\r\n 'django.contrib.messages.middleware.MessageMiddleware',\r\n 'django.middleware.clickjacking.XFrameOptionsMiddleware',\r\n 'project.utils.middleware.EventMiddleware']\r\n\r\nTraceback:\r\n\r\nFile \"/Users/me/.pyenv/versions/3.6.3/lib/python3.6/site-packages/django/template/utils.py\" in __getitem__\r\n  65.             return self._engines[alias]\r\nDuring handling of the above exception ('django'), another exception occurred:\r\nFile \"/Users/me/.pyenv/versions/3.6.3/lib/python3.6/site-packages/django/core/handlers/base.py\" in get_response\r\n  131.                 response = middleware_method(request, response)\r\nFile \"/Users/me/.pyenv/versions/3.6.3/lib/python3.6/site-packages/honeypot/middleware.py\" in process_response\r\n  54.             response.content = _POST_FORM_RE.sub(add_honeypot_field, force_text(response.content))\r\nFile \"/Users/me/.pyenv/versions/3.6.3/lib/python3.6/site-packages/honeypot/middleware.py\" in add_honeypot_field\r\n  51.                                                    'value': value}))\r\nFile \"/Users/me/.pyenv/versions/3.6.3/lib/python3.6/site-packages/django/template/loader.py\" in render_to_string\r\n  67.         template = get_template(template_name, using=using)\r\nFile \"/Users/me/.pyenv/versions/3.6.3/lib/python3.6/site-packages/django/template/loader.py\" in get_template\r\n  18.     engines = _engine_list(using)\r\nFile \"/Users/me/.pyenv/versions/3.6.3/lib/python3.6/site-packages/django/template/loader.py\" in _engine_list\r\n  72.     return engines.all() if using is None else [engines[using]]\r\nFile \"/Users/me/.pyenv/versions/3.6.3/lib/python3.6/site-packages/django/template/utils.py\" in all\r\n  89.         return [self[alias] for alias in self]\r\nFile \"/Users/me/.pyenv/versions/3.6.3/lib/python3.6/site-packages/django/template/utils.py\" in <listcomp>\r\n  89.         return [self[alias] for alias in self]\r\nFile \"/Users/me/.pyenv/versions/3.6.3/lib/python3.6/site-packages/django/template/utils.py\" in __getitem__\r\n  80.             engine = engine_cls(params)\r\nFile \"/Users/me/.pyenv/versions/3.6.3/lib/python3.6/site-packages/django/template/backends/django.py\" in __init__\r\n  30.         options['libraries'] = self.get_templatetag_libraries(libraries)\r\nFile \"/Users/me/.pyenv/versions/3.6.3/lib/python3.6/site-packages/django/template/backends/django.py\" in get_templatetag_libraries\r\n  48.         libraries = get_installed_libraries()\r\nFile \"/Users/me/.pyenv/versions/3.6.3/lib/python3.6/site-packages/django/template/backends/django.py\" in get_installed_libraries\r\n  113.             for name in get_package_libraries(pkg):\r\nFile \"/Users/me/.pyenv/versions/3.6.3/lib/python3.6/site-packages/django/template/backends/django.py\" in get_package_libraries\r\n  126.             module = import_module(entry[1])\r\nFile \"/Users/me/.pyenv/versions/3.6.3/lib/python3.6/importlib/__init__.py\" in import_module\r\n  126.     return _bootstrap._gcd_import(name[level:], package, level)\r\nFile \"/Users/me/.pyenv/versions/3.6.3/lib/python3.6/site-packages/compressor/templatetags/compress.py\" in <module>\r\n  4. from compressor.cache import (cache_get, cache_set, get_offline_hexdigest,`\r\n\r\nbased on where it's occurring with the import seems like it might be an issue with importing or accessing `COMPRESS_CACHE_KEY_FUNCTION` (https://django-compressor.readthedocs.io/en/latest/settings/#django.conf.settings.COMPRESS_CACHE_KEY_FUNCTION) from this function:\r\n\r\n```\r\ndef get_cachekey(*args, **kwargs):\r\n    global _cachekey_func\r\n    if _cachekey_func is None:\r\n        try:\r\n            mod_name, func_name = get_mod_func(\r\n                settings.COMPRESS_CACHE_KEY_FUNCTION)\r\n            _cachekey_func = getattr(import_module(mod_name), func_name)\r\n        except (AttributeError, ImportError), e:\r\n            raise ImportError(\"Couldn't import cache key function %s: %s\" %\r\n                              (settings.COMPRESS_CACHE_KEY_FUNCTION, e))\r\n    return _cachekey_func(*args, **kwargs)\r\n```\r\n\r\nany guidance on where I should try to research further? thanks\r\n\r\nProject is:\r\nDjango Version: | 1.11.9\r\nAs you can see Python 3.6.3\r\n\r\n\r\n"}}
{"actor":{"display_login":"ChrisBolman"}}