marazmiki/django-selectel-storage

KeyError: 'x-object-downloads'

Closed this issue · 2 comments

Traceback (most recent call last):
  File "./manage.py", line 4, in <module>
    main()
  ...
  File "/opt/vluki/vluki/base/management/commands/cdn_sync.py", line 41, in handle
    if cdn_storage.exists(cdn_filename):
  File "/usr/local/lib/python2.7/dist-packages/django_selectel_storage/storage.py", line 98, in exists
    self.container.info(self._name(name))
  File "/usr/local/lib/python2.7/dist-packages/selectel/storage.py", line 234, in method
    return fn(self.name, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/selectel/storage.py", line 15, in wrapper
    return fn(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/selectel/storage.py", line 190, in info
    "downloads": int(r.headers["X-Object-Downloads"])
  File "/usr/local/lib/python2.7/dist-packages/requests/structures.py", line 54, in __getitem__
    return self._store[key.lower()][1]
KeyError: 'x-object-downloads'

Too small information.

Are you provided valid credentials to container? Are there some connection troubles on your machine or so on?

Also, as fair as I understand, this exception causes not django-selectel storage, but selectel api. If you're sure about correct credentials, you would write issue to https://github.com/go1dshtein/selectel-api/issues

Credentials is valid.
Ok! (go1dshtein/selectel-api#2)