Reputation: 5076
I'm configuring sorl-thumbnail
and when memcached is running locally I get this error:
OperationalError at /groups/1/
no such table: thumbnail_kvstore
When memcached isn't running (obviously doesn't work):
TypeError at /groups/1/
a bytes-like object is required, not 'str'
What's wrong with my configuration? Why is it saying there's no thumbnail_kvstore
table? Here are my settings variables. I tried setting the THUMBNAIL_KVSTORE
setting but it didn't change anything:
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
'LOCATION': '127.0.0.1:11211',
}
}
THUMBNAIL_DEBUG = True
THUMBNAIL_FORMAT = 'PNG'
Upvotes: 2
Views: 2379
Reputation: 1340
If just
manage.py makemigrations
doesn't create any migrations, try
manage.py makemigrations thumbnail
manage.py migrate
This will create migrations for thumbnail and then migrate them. It works for me. I am using Django 1.9 and sorl.thumbnail 12.3.
Upvotes: 16
Reputation: 5076
I had to force upgrade sorl-thumbnail:
pip install --pre --upgrade sorl-thumbnail
https://github.com/mariocesar/sorl-thumbnail/issues/384
Upvotes: 5