Django imagekit cumulus - ResponseError: 401: Unauthorized
This is driving me crazy. Is there someone out there that can help?
Traceback (most recent call last):
Fil开发者_JAVA技巧e "/opt/python2.6/lib/python2.6/site-packages/django/core/handlers/base.py", line 92, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/www/django_test1/omu2/views.py", line 26, in frontIndex
context_instance=RequestContext(request))
File "/opt/python2.6/lib/python2.6/site-packages/django/shortcuts/__init__.py", line 20, in render_to_response
return HttpResponse(loader.render_to_string(*args, **kwargs), **httpresponse_kwargs)
File "/opt/python2.6/lib/python2.6/site-packages/django/template/loader.py", line 108, in render_to_string
return t.render(context_instance)
File "/opt/python2.6/lib/python2.6/site-packages/django/template/__init__.py", line 178, in render
return self.nodelist.render(context)
File "/opt/python2.6/lib/python2.6/site-packages/django/template/__init__.py", line 779, in render
bits.append(self.render_node(node, context))
File "/opt/python2.6/lib/python2.6/site-packages/django/template/__init__.py", line 792, in render_node
return node.render(context)
File "/opt/python2.6/lib/python2.6/site-packages/django/template/loader_tags.py", line 97, in render
return compiled_parent.render(context)
File "/opt/python2.6/lib/python2.6/site-packages/django/template/__init__.py", line 178, in render
return self.nodelist.render(context)
File "/opt/python2.6/lib/python2.6/site-packages/django/template/__init__.py", line 779, in render
bits.append(self.render_node(node, context))
File "/opt/python2.6/lib/python2.6/site-packages/django/template/__init__.py", line 792, in render_node
return node.render(context)
File "/opt/python2.6/lib/python2.6/site-packages/django/template/loader_tags.py", line 24, in render
result = self.nodelist.render(context)
File "/opt/python2.6/lib/python2.6/site-packages/django/template/__init__.py", line 779, in render
bits.append(self.render_node(node, context))
File "/opt/python2.6/lib/python2.6/site-packages/django/template/__init__.py", line 792, in render_node
return node.render(context)
File "/opt/python2.6/lib/python2.6/site-packages/django/template/__init__.py", line 946, in render
autoescape=context.autoescape))
File "/opt/python2.6/lib/python2.6/site-packages/django/template/__init__.py", line 779, in render
bits.append(self.render_node(node, context))
File "/opt/python2.6/lib/python2.6/site-packages/django/template/__init__.py", line 792, in render_node
return node.render(context)
File "/opt/python2.6/lib/python2.6/site-packages/django/template/defaulttags.py", line 243, in render
return self.nodelist_true.render(context)
File "/opt/python2.6/lib/python2.6/site-packages/django/template/__init__.py", line 779, in render
bits.append(self.render_node(node, context))
File "/opt/python2.6/lib/python2.6/site-packages/django/template/__init__.py", line 792, in render_node
return node.render(context)
File "/opt/python2.6/lib/python2.6/site-packages/django/template/defaulttags.py", line 155, in render
nodelist.append(node.render(context))
File "/opt/python2.6/lib/python2.6/site-packages/django/template/__init__.py", line 826, in render
output = self.filter_expression.resolve(context)
File "/opt/python2.6/lib/python2.6/site-packages/django/template/__init__.py", line 546, in resolve
obj = self.var.resolve(context)
File "/opt/python2.6/lib/python2.6/site-packages/django/template/__init__.py", line 687, in resolve
value = self._resolve_lookup(context)
File "/opt/python2.6/lib/python2.6/site-packages/django/template/__init__.py", line 716, in _resolve_lookup
current = getattr(current, bit)
File "/opt/python2.6/lib/python2.6/site-packages/django_imagekit-0.3.3-py2.6.egg/imagekit/specs.py", line 94, in url
self._create()
File "/opt/python2.6/lib/python2.6/site-packages/django_imagekit-0.3.3-py2.6.egg/imagekit/specs.py", line 54, in _create
if self._exists():
File "/opt/python2.6/lib/python2.6/site-packages/django_imagekit-0.3.3-py2.6.egg/imagekit/specs.py", line 72, in _exists
return self._obj._storage.exists(self.name)
File "/opt/python2.6/lib/python2.6/site-packages/cumulus/storage.py", line 147, in exists
self._get_cloud_obj(name)
File "/opt/python2.6/lib/python2.6/site-packages/cumulus/storage.py", line 99, in _get_cloud_obj
return self.container.get_object(name)
File "/www/django_test1/omu2/src/python-cloudfiles/cloudfiles/utils.py", line 43, in decorator
return f(*args, **kwargs)
File "/www/django_test1/omu2/src/python-cloudfiles/cloudfiles/container.py", line 316, in get_object
return Object(self, object_name, force_exists=True)
File "/www/django_test1/omu2/src/python-cloudfiles/cloudfiles/storage_object.py", line 89, in __init__
if not self._initialize() and force_exists:
File "/www/django_test1/omu2/src/python-cloudfiles/cloudfiles/storage_object.py", line 468, in _initialize
raise ResponseError(response.status, response.reason)
ResponseError: 401: Unauthorized
Ok, so I have done a bit of digging and fond that django-1.1.1
, django-imagekit-0.3.3
and django-cumulus-0.3.3
or earlier versions don't play well together.
I upgraded to django-1.1.2 django-cumulus-0.3.4
and works fine now.
to do this do the following - pip install -r http://bitbucket.org/richleland/django-cumulus/raw/0.3.4/requirements.txt
精彩评论