I have an issue when i go to the gallery page.
The page works fine if no images are linked to an album but if so i get the following error :
`Traceback (most recent call last):
File "/home/simon/.local/lib/python3.8/site-packages/django/template/base.py", line 829, in _resolve_lookup
current = current[bit]
TypeError: 'ImageCacheFile' object is not subscriptable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.8/wsgiref/handlers.py", line 137, in run
self.result = application(self.environ, self.start_response)
File "/home/simon/.local/lib/python3.8/site-packages/django/contrib/staticfiles/handlers.py", line 76, in __call__
return self.application(environ, start_response)
File "/home/simon/.local/lib/python3.8/site-packages/django/core/handlers/wsgi.py", line 133, in __call__
response = self.get_response(request)
File "/home/simon/.local/lib/python3.8/site-packages/django/core/handlers/base.py", line 128, in get_response
response = self._middleware_chain(request)
File "/home/simon/.local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 49, in inner
response = response_for_exception(request, exc)
File "/home/simon/.local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 103, in response_for_exception
response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
File "/home/simon/.local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/home/simon/.local/lib/python3.8/site-packages/whitenoise/middleware.py", line 59, in __call__
response = self.get_response(request)
File "/home/simon/.local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 49, in inner
response = response_for_exception(request, exc)
File "/home/simon/.local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 103, in response_for_exception
response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
File "/home/simon/.local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/home/simon/.local/lib/python3.8/site-packages/django/utils/deprecation.py", line 114, in __call__
response = response or self.get_response(request)
File "/home/simon/.local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 49, in inner
response = response_for_exception(request, exc)
File "/home/simon/.local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 103, in response_for_exception
response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
File "/home/simon/.local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/home/simon/.local/lib/python3.8/site-packages/django/utils/deprecation.py", line 114, in __call__
response = response or self.get_response(request)
File "/home/simon/.local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 49, in inner
response = response_for_exception(request, exc)
File "/home/simon/.local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 103, in response_for_exception
response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
File "/home/simon/.local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/home/simon/.local/lib/python3.8/site-packages/django/utils/deprecation.py", line 114, in __call__
response = response or self.get_response(request)
File "/home/simon/.local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 49, in inner
response = response_for_exception(request, exc)
File "/home/simon/.local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 103, in response_for_exception
response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
File "/home/simon/.local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/home/simon/.local/lib/python3.8/site-packages/django/utils/deprecation.py", line 114, in __call__
response = response or self.get_response(request)
File "/home/simon/.local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 49, in inner
response = response_for_exception(request, exc)
File "/home/simon/.local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 103, in response_for_exception
response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
File "/home/simon/.local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/home/simon/.local/lib/python3.8/site-packages/django/utils/deprecation.py", line 114, in __call__
response = response or self.get_response(request)
File "/home/simon/.local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 49, in inner
response = response_for_exception(request, exc)
File "/home/simon/.local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 103, in response_for_exception
response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
File "/home/simon/.local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/home/simon/.local/lib/python3.8/site-packages/django/utils/deprecation.py", line 114, in __call__
response = response or self.get_response(request)
File "/home/simon/.local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 49, in inner
response = response_for_exception(request, exc)
File "/home/simon/.local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 103, in response_for_exception
response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
File "/home/simon/.local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/home/simon/.local/lib/python3.8/site-packages/django/utils/deprecation.py", line 114, in __call__
response = response or self.get_response(request)
File "/home/simon/.local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 49, in inner
response = response_for_exception(request, exc)
File "/home/simon/.local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 103, in response_for_exception
response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
File "/home/simon/.local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/home/simon/.local/lib/python3.8/site-packages/django/core/handlers/base.py", line 202, in _get_response
response = response.render()
File "/home/simon/.local/lib/python3.8/site-packages/django/template/response.py", line 105, in render
self.content = self.rendered_content
File "/home/simon/.local/lib/python3.8/site-packages/django/template/response.py", line 83, in rendered_content
return template.render(context, self._request)
File "/home/simon/.local/lib/python3.8/site-packages/django/template/backends/django.py", line 61, in render
return self.template.render(context)
File "/home/simon/.local/lib/python3.8/site-packages/django/template/base.py", line 170, in render
return self._render(context)
File "/home/simon/.local/lib/python3.8/site-packages/django/template/base.py", line 162, in _render
return self.nodelist.render(context)
File "/home/simon/.local/lib/python3.8/site-packages/django/template/base.py", line 938, in render
bit = node.render_annotated(context)
File "/home/simon/.local/lib/python3.8/site-packages/django/template/base.py", line 905, in render_annotated
return self.render(context)
File "/home/simon/.local/lib/python3.8/site-packages/django/template/loader_tags.py", line 150, in render
return compiled_parent._render(context)
File "/home/simon/.local/lib/python3.8/site-packages/django/template/base.py", line 162, in _render
return self.nodelist.render(context)
File "/home/simon/.local/lib/python3.8/site-packages/django/template/base.py", line 938, in render
bit = node.render_annotated(context)
File "/home/simon/.local/lib/python3.8/site-packages/django/template/base.py", line 905, in render_annotated
return self.render(context)
File "/home/simon/.local/lib/python3.8/site-packages/django/template/loader_tags.py", line 62, in render
result = block.nodelist.render(context)
File "/home/simon/.local/lib/python3.8/site-packages/django/template/base.py", line 938, in render
bit = node.render_annotated(context)
File "/home/simon/.local/lib/python3.8/site-packages/django/template/base.py", line 905, in render_annotated
return self.render(context)
File "/home/simon/.local/lib/python3.8/site-packages/django/template/defaulttags.py", line 211, in render
nodelist.append(node.render_annotated(context))
File "/home/simon/.local/lib/python3.8/site-packages/django/template/base.py", line 905, in render_annotated
return self.render(context)
File "/home/simon/.local/lib/python3.8/site-packages/django/template/defaulttags.py", line 312, in render
return nodelist.render(context)
File "/home/simon/.local/lib/python3.8/site-packages/django/template/base.py", line 938, in render
bit = node.render_annotated(context)
File "/home/simon/.local/lib/python3.8/site-packages/django/template/base.py", line 905, in render_annotated
return self.render(context)
File "/home/simon/.local/lib/python3.8/site-packages/django/template/defaulttags.py", line 516, in render
return self.nodelist.render(context)
File "/home/simon/.local/lib/python3.8/site-packages/django/template/base.py", line 938, in render
bit = node.render_annotated(context)
File "/home/simon/.local/lib/python3.8/site-packages/django/template/base.py", line 905, in render_annotated
return self.render(context)
File "/home/simon/.local/lib/python3.8/site-packages/django/template/loader_tags.py", line 192, in render
return template.render(context)
File "/home/simon/.local/lib/python3.8/site-packages/django/template/base.py", line 172, in render
return self._render(context)
File "/home/simon/.local/lib/python3.8/site-packages/django/template/base.py", line 162, in _render
return self.nodelist.render(context)
File "/home/simon/.local/lib/python3.8/site-packages/django/template/base.py", line 938, in render
bit = node.render_annotated(context)
File "/home/simon/.local/lib/python3.8/site-packages/django/template/base.py", line 905, in render_annotated
return self.render(context)
File "/home/simon/.local/lib/python3.8/site-packages/django/template/defaulttags.py", line 477, in render
value = self.val_expr.resolve(context)
File "/home/simon/.local/lib/python3.8/site-packages/django/template/base.py", line 671, in resolve
obj = self.var.resolve(context)
File "/home/simon/.local/lib/python3.8/site-packages/django/template/base.py", line 796, in resolve
value = self._resolve_lookup(context)
File "/home/simon/.local/lib/python3.8/site-packages/django/template/base.py", line 837, in _resolve_lookup
current = getattr(current, bit)
File "/home/simon/.local/lib/python3.8/site-packages/django/core/files/images.py", line 19, in width
return self._get_image_dimensions()[0]
File "/home/simon/.local/lib/python3.8/site-packages/django/core/files/images.py", line 28, in _get_image_dimensions
self.open()
File "/home/simon/.local/lib/python3.8/site-packages/imagekit/files.py", line 58, in open
self._require_file()
File "/home/simon/.local/lib/python3.8/site-packages/imagekit/cachefiles/__init__.py", line 63, in _require_file
self._file = self.storage.open(self.name, 'rb')
File "/home/simon/.local/lib/python3.8/site-packages/django/core/files/storage.py", line 36, in open
return self._open(name, mode)
File "/home/simon/.local/lib/python3.8/site-packages/cloudinary_storage/storage.py", line 50, in _open
raise IOError
OSError
[15/Nov/2020 14:20:19] "GET /gallery/ HTTP/1.1" 500 59
`
My media files are stored in cloudinary, maybe tahis is where the issue come from ?