Skip to content

Unicode error when trying to acces resource.url #46

@ynnk

Description

@ynnk

Resource let's say 'wiki_pages fails' to return url property when wiki.title contains french accents.
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 6: ordinal not in range(128)

  • wiki.query_one is utf8 encoded
  • wiki.title is unicode encoded

ex:

'{0}'.format(u"Une suite de caractères en français")

UnicodeEncodeError Traceback (most recent call last)
in ()
----> 1 '{0}'.format(u"Une suite de caractères en français")

patch in my version using

@property
def internal_id(self):
    return self.title.encode('utf8')

but query_one could also be unicode.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions