menu
Channels
# All channels
view-forward
# General
view-forward
# Announcements
view-forward
# Design
view-forward
# Development
view-forward
# Saleor 3.0
view-forward
# Saleor Features
view-forward
Team

Thumbnails not created in saleor 2.10

May 16, 2020 at 8:01am

Thumbnails not created in saleor 2.10

May 16, 2020 at 8:01am (Edited 3 months ago)
Hello team, I have deployed saleor 2.10 (core, dashboard and storefront) to heroku. I am using AWS S3 media bucket to store product images. Most of the images were uploaded from dashboard 2.9 instance and I am trying to migrate everything to the latest version of your awesome products. I have managed to merge the newest version with 2.9 version. Everything seems to be working properly except thumbnails of product images are not being created in my 2.10 version of dashboard. I have tried to create the thumbnails manually as recommended in your documentation by executing the following command:
heroku run python manage.py create_thumbnails
But I got some weird errors. Is there any other alternative solution to my problem please?
Thank you in advance!
Traceback (most recent call last): File "/app/.heroku/python/lib/python3.8/site-packages/versatileimagefield/imagewarmer.py", line 114, in prewarmversatileimagefield url = geturlfromimagekey(versatileimagefieldfile, sizekey) File "/app/.heroku/python/lib/python3.8/site-packages/versatileimagefield/utils.py", line 196, in geturlfromimagekey imgurl = imgurl[sizekey].url File "/app/.heroku/python/lib/python3.8/site-packages/versatileimagefield/datastructures/sizedimage.py", line 132, in _getitem if cache.get(resized_url) and resized_url is not None: File "/app/.heroku/python/lib/python3.8/site-packages/django/core/cache/\_init.py", line 98, in __getattr return getattr(caches[DEFAULT_CACHE_ALIAS], name) File "/app/.heroku/python/lib/python3.8/site-packages/django/core/cache/__init.py", line 79, in __getitem cache = _create_cache(alias) File "/app/.heroku/python/lib/python3.8/site-packages/django/core/cache/__init.py", line 52, in _create_cache raise InvalidCacheBackendError( django.core.cache.backends.base.InvalidCacheBackendError: Could not find backend 'django_redis.cache.RedisCache': No module named 'django_redis' ERROR versatileimagefield.image_warmer Thumbnail generation failed [PID:4:MainThread] Traceback (most recent call last): File "/app/.heroku/python/lib/python3.8/site-packages/django/core/cache/__init.py", line 50, in _create_cache backend_cls = import_string(backend) File "/app/.heroku/python/lib/python3.8/site-packages/django/utils/module_loading.py", line 17, in import_string module = import_module(module_path) File "/app/.heroku/python/lib/python3.8/importlib/__init_.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1014, in _gcd_import File "<frozen importlib._bootstrap>", line 991, in _find_and_load File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "<frozen importlib._bootstrap>", line 1014, in _gcd_import File "<frozen importlib._bootstrap>", line 991, in _find_and_load File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked ModuleNotFoundError: No module named 'django_redis

May 16, 2020 at 11:16am
Installing django-redis package via poetry solved my problem. Just in case someone else runs into the same problem :)
  • reply
  • like
I'm facing the same issue. We run the celery runner on our own and see the same error. Seems like this dependency is missing?
  • reply
  • like

May 16, 2020 at 10:00pm
After installing the redis package you also need to re-generate the requirement files using poetry. Here are the commands if they help ;)
  • poetry add django-redis -> to install package And these commands re-generate the requirement files:
  • poetry export -f requirements.txt -o requirements_dev.txt --dev --without-hashes
  • poetry export -f requirements.txt -o requirements.txt --without-hashes
I executed all commands from saleor core root directory.
Edited
like-fill
1
  • reply
  • like

May 20, 2020 at 8:54pm
but this is definitely missing in the main repo right?
  • reply
  • like
I could get it running like this as well
  • reply
  • like
hey maybe something small to fix ?
  • reply
  • like

May 21, 2020 at 10:23am
Let me check with the team. I'll let you know if I have any news :)
  • reply
  • like

July 15, 2020 at 4:21am
Saved me here! Thanks.
  • reply
  • like