0

https://github.com/pydanny/cookiecutter-djangoを使用しています。これには、memcached に依存しているように見えるdjango-avatarが含まれています。これは、 http:///avatar/change/にあるアバターの標準URLに移動すると、次のエラーが発生するためです。私のサイトのstaging.cryptopals.org/avatar/change/ (リンクにはサインアップが必要です)。要件ファイルに追加django-heroku-memcacheify==0.5したばかりですが、効果がありません。この問題は、ローカルでは発生しません。

Traceback (most recent call last):

  File "/app/.heroku/python/lib/python2.7/site-packages/django/core/handlers/base.py", line 114, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)

  File "/app/.heroku/python/lib/python2.7/site-packages/django/contrib/auth/decorators.py", line 22, in _wrapped_view
    return view_func(request, *args, **kwargs)

  File "/app/.heroku/python/lib/python2.7/site-packages/avatar/views.py", line 123, in change
    return render(request, 'avatar/change.html', context)

  File "/app/.heroku/python/lib/python2.7/site-packages/django/shortcuts/__init__.py", line 53, in render
    return HttpResponse(loader.render_to_string(*args, **kwargs),

  File "/app/.heroku/python/lib/python2.7/site-packages/django/template/loader.py", line 169, in render_to_string
    return t.render(context_instance)

  File "/app/.heroku/python/lib/python2.7/site-packages/django/template/base.py", line 140, in render
    return self._render(context)

  File "/app/.heroku/python/lib/python2.7/site-packages/django/template/base.py", line 134, in _render
    return self.nodelist.render(context)

  File "/app/.heroku/python/lib/python2.7/site-packages/django/template/base.py", line 840, in render
    bit = self.render_node(node, context)

  File "/app/.heroku/python/lib/python2.7/site-packages/django/template/debug.py", line 78, in render_node
    return node.render(context)

  File "/app/.heroku/python/lib/python2.7/site-packages/django/template/loader_tags.py", line 123, in render
    return compiled_parent._render(context)

  File "/app/.heroku/python/lib/python2.7/site-packages/django/template/base.py", line 134, in _render
    return self.nodelist.render(context)

  File "/app/.heroku/python/lib/python2.7/site-packages/django/template/base.py", line 840, in render
    bit = self.render_node(node, context)

  File "/app/.heroku/python/lib/python2.7/site-packages/django/template/debug.py", line 78, in render_node
    return node.render(context)

  File "/app/.heroku/python/lib/python2.7/site-packages/django/template/loader_tags.py", line 123, in render
    return compiled_parent._render(context)

  File "/app/.heroku/python/lib/python2.7/site-packages/django/template/base.py", line 134, in _render
    return self.nodelist.render(context)

  File "/app/.heroku/python/lib/python2.7/site-packages/django/template/base.py", line 840, in render
    bit = self.render_node(node, context)

  File "/app/.heroku/python/lib/python2.7/site-packages/django/template/debug.py", line 78, in render_node
    return node.render(context)

  File "/app/.heroku/python/lib/python2.7/site-packages/django/template/loader_tags.py", line 62, in render
    result = block.nodelist.render(context)

  File "/app/.heroku/python/lib/python2.7/site-packages/django/template/base.py", line 840, in render
    bit = self.render_node(node, context)

  File "/app/.heroku/python/lib/python2.7/site-packages/django/template/debug.py", line 78, in render_node
    return node.render(context)

  File "/app/.heroku/python/lib/python2.7/site-packages/django/template/base.py", line 1125, in render
    return func(*resolved_args, **resolved_kwargs)

  File "/app/.heroku/python/lib/python2.7/site-packages/avatar/templatetags/avatar_tags.py", line 54, in avatar
    url = avatar_url(user, size)

  File "/app/.heroku/python/lib/python2.7/site-packages/avatar/util.py", line 72, in cached_func
    result = cache.get(key)

  File "/app/.heroku/python/lib/python2.7/site-packages/django/core/cache/backends/memcached.py", line 75, in get
    val = self._cache.get(key)

ConnectionError: error 3 from memcached_get(:1:avatar_url_eui_80_2387): CONNECTION FAILURE, host: 127.0.0.1:11211 -> libmemcached/get.cc:314


<WSGIRequest
path:/avatar/change/,
GET:<QueryDict: {}>,
POST:<QueryDict: {}>,
COOKIES:{'_ga': 'GA1.2.563346429.1397860873',
 'csrftoken': '7srXCc4fgIGaJv4YHXs0Oo4afq6Nsqlm',
 'fbsr_623955891003497': 'cneNho68Qq-S4JyqCboIPgTNXk0ex5YKNjeIEh_79bo.eyJhbGdvcml0aG0iOiJITUFDLVNIQTI1NiIsImNvZGUiOiJBUURxc1ZPS0h3T3d4ZVRHMmR5MWhjN3pubElsX0stRGNCci1tNXY0NVplbkhJMVJac1NaNElTeFVJTGVzREZULUV4QTJxQUVIUmtVcS1MYUN4LVVxVnhtT0lQa3JaQlJaUGdlVk1ZMWJGNFZIdFo5VktnNlZaSmlOOHc1Y0JNck1lQ1NsZlUydC1ZN2xndGdnNFpNdThTWnZMYzl3b0xKNGZaRWNqSGpScF9IRTI1TW1CYlpMeGRWLV9Bc1Nha2Y3bGNVcFp5eEtIX2xxaUpuRkpiRDNxNWJNNGNjaElra3ZCZUpwRWpNVlRkd1pQZEpiWGVBTXo2TEcxRFhaamZUU3JyVlZGeDlscFZiNzhTdEEtcnFsZTRKLVJoV2MzSkRoYnh1OXQwTmxJeXBWcDVqM3JyZ1AxNFMtVWFrS0U5ZUMzQ3dHY1IyOGhPWmR4N0I1RTZCQjdIdCIsImlzc3VlZF9hdCI6MTQwNzQ5ODg1OCwidXNlcl9pZCI6IjEwMDAwMTMyNjM3OTU2NSJ9',
 'sessionid': '0qke11tcx2nh9ur17hjzdyugnszb539d'},
META:{u'CSRF_COOKIE': u'7srXCc4fgIGaJv4YHXs0Oo4afq6Nsqlm',
 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch',
 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.8,es;q=0.6',
 'HTTP_CONNECTION': 'close',
 'HTTP_CONNECT_TIME': '1',
 'HTTP_COOKIE': '_ga=GA1.2.563346429.1397860873; fbsr_623955891003497=cneNho68Qq-S4JyqCboIPgTNXk0ex5YKNjeIEh_79bo.eyJhbGdvcml0aG0iOiJITUFDLVNIQTI1NiIsImNvZGUiOiJBUURxc1ZPS0h3T3d4ZVRHMmR5MWhjN3pubElsX0stRGNCci1tNXY0NVplbkhJMVJac1NaNElTeFVJTGVzREZULUV4QTJxQUVIUmtVcS1MYUN4LVVxVnhtT0lQa3JaQlJaUGdlVk1ZMWJGNFZIdFo5VktnNlZaSmlOOHc1Y0JNck1lQ1NsZlUydC1ZN2xndGdnNFpNdThTWnZMYzl3b0xKNGZaRWNqSGpScF9IRTI1TW1CYlpMeGRWLV9Bc1Nha2Y3bGNVcFp5eEtIX2xxaUpuRkpiRDNxNWJNNGNjaElra3ZCZUpwRWpNVlRkd1pQZEpiWGVBTXo2TEcxRFhaamZUU3JyVlZGeDlscFZiNzhTdEEtcnFsZTRKLVJoV2MzSkRoYnh1OXQwTmxJeXBWcDVqM3JyZ1AxNFMtVWFrS0U5ZUMzQ3dHY1IyOGhPWmR4N0I1RTZCQjdIdCIsImlzc3VlZF9hdCI6MTQwNzQ5ODg1OCwidXNlcl9pZCI6IjEwMDAwMTMyNjM3OTU2NSJ9; sessionid=0qke11tcx2nh9ur17hjzdyugnszb539d; csrftoken=7srXCc4fgIGaJv4YHXs0Oo4afq6Nsqlm',
 'HTTP_HOST': 'staging.cryptopals.org',
 'HTTP_REFERER': 'http://staging.cryptopals.org/users/eui/',
 'HTTP_TOTAL_ROUTE_TIME': '0',
 'HTTP_USER_AGENT': 'Mozilla/5.0',
 'HTTP_VIA': '1.1 vegur',
 'HTTP_X_FORWARDED_FOR': '94.223.6.33',
 'HTTP_X_FORWARDED_PORT': '80',
 'HTTP_X_FORWARDED_PROTO': 'http',
 'HTTP_X_REQUEST_ID': '52f2318d-5f4c-4717-ba2c-0e67313d86af',
 'HTTP_X_REQUEST_START': '1407499899207',
 'PATH_INFO': u'/avatar/change/',
 'QUERY_STRING': '',
 'RAW_URI': '/avatar/change/',
 'REMOTE_ADDR': '10.121.6.32',
 'REMOTE_PORT': '43523',
 'REQUEST_METHOD': 'GET',
 'SCRIPT_NAME': u'',
 'SERVER_NAME': 'staging.cryptopals.org',
 'SERVER_PORT': '80',
 'SERVER_PROTOCOL': 'HTTP/1.1',
 'SERVER_SOFTWARE': 'gunicorn/0.17.4',
 'gunicorn.socket': <socket._socketobject object at 0x3b2c360>,
 'wsgi.errors': <open file '<stderr>', mode 'w' at 0x7f210e5271e0>,
 'wsgi.file_wrapper': <class gunicorn.http.wsgi.FileWrapper at 0x2561e20>,
 'wsgi.input': <gunicorn.http.body.Body object at 0x3b2ee10>,

ここで何がうまくいかないのですか?

4

0 に答える 0