[djapian-users] Unicode issues

4 views
Skip to first unread message

AP

unread,
Apr 21, 2010, 2:02:39 PM4/21/10
to Djapian Users
Hi!

I'm still having issues with the indexer and non-ASCII characters.
This is line 70 in indexer.py (svn trunk):

value = u', '.join(map(lambda v: smart_str(self.resolve_one(v,
bit)), value))

The result of the map function is a list of byte strings, which is
joined by a unicode object. Is this really intended or is this a
bug? The indexer doesn't throw a UnicodeDecodeError when joining the
list by a byte string or using unicode objects within the list.

works:

value = ', '.join(map(lambda v: smart_str(self.resolve_one(v,
bit)), value))

works:

value = u', '.join(map(lambda v: smart_unicode(self.resolve_one(v,
bit)), value))

Is "value" supposed to be a unicode object or a byte string?

Bye, Andreas

--
You received this message because you are subscribed to the Google Groups "Djapian Users" group.
To post to this group, send email to djapia...@googlegroups.com.
To unsubscribe from this group, send email to djapian-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/djapian-users?hl=en.

Alex Koshelev

unread,
Apr 24, 2010, 10:38:05 AM4/24/10
to Djapian Users
Thanks. It was really the bug. Now fixed.

---
Alex Koshelev

AP

unread,
Apr 24, 2010, 11:04:21 AM4/24/10
to Djapian Users
On Apr 24, 4:38 pm, Alex Koshelev <daeva...@gmail.com> wrote:
> Thanks. It was really the bug. Now fixed.

Great, thank you.

khandavally sharma

unread,
Apr 27, 2010, 6:22:15 AM4/27/10
to djapia...@googlegroups.com
Thanks Alex index --rebuild is working but  issue is that when I try to use an object in views.py as indexer =CompositeIndexer(Person.index,Studio.index,Movie.index) then it shows an error like for my model class there is no attribute indexer it says.
I am not getting how to resolve this error
regards,
Sharma
Reply all
Reply to author
Forward
0 new messages