kiddouk / redisco

A Python Library for Simple Models and Containers Persisted in Redis

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ListField unicode load error in Model.objects.all() function

ScenK opened this issue · comments

class Article(models.Model):
       title = models.Attribute()
       tags = models.ListField(unicode)

 new = Article(title='what ever')
 new.tags = [ u'Niña', u'Niñb' ]
 new.save()

While when load:

Article.objects.all()

UnicodeDecodeError: 'ascii' codec can't decode byte 0xe4 in position 0: ordinal not in range(128)

In redis-cli:

redis 127.0.0.1:6379> GET "Article:tags:5omv5reh"
(error) ERR Operation against a key holding the wrong kind of value