finalion / WordQuery

word fast-querying addon for anki
https://ankiweb.net/shared/info/775418273
GNU General Public License v3.0
291 stars 61 forks source link

UnicodeEncodeErrorUnicodeEncodeError #45

Closed hosseinalipour closed 7 years ago

hosseinalipour commented 7 years ago

this is occurring on every word that has something like (ö,ş,ü) ... how do I fix it?

An error occurred in an add-on.
Please post on the add-on forum:
https://anki.tenderapp.com/discussions/add-ons

Traceback (most recent call last):
Traceback (most recent call last):
  File "C:\Users\landlord\AppData\Roaming\Anki2\addons\wquery\query.py", line 314, in run
  File "C:\Users\landlord\AppData\Roaming\Anki2\addons\wquery\query.py", line 314, in run
        result = self.query(service_field, word)
result = self.query(service_field, word)
  File "C:\Users\landlord\AppData\Roaming\Anki2\addons\wquery\query.py", line 326, in query
  File "C:\Users\landlord\AppData\Roaming\Anki2\addons\wquery\query.py", line 326, in query
        return self.service.active(service_field, word)
return self.service.active(service_field, word)
  File "C:\Users\landlord\AppData\Roaming\Anki2\addons\wquery\service\base.py", line 201, in active
  File "C:\Users\landlord\AppData\Roaming\Anki2\addons\wquery\service\base.py", line 201, in active
        result = each[1]()
result = each[1]()
  File "C:\Users\landlord\AppData\Roaming\Anki2\addons\wquery\service\base.py", line 59, in _deco
  File "C:\Users\landlord\AppData\Roaming\Anki2\addons\wquery\service\base.py", line 59, in _deco
        res = fld_func(cls, *args, **kwargs)
res = fld_func(cls, *args, **kwargs)
  File "C:\Users\landlord\AppData\Roaming\Anki2\addons\wquery\service\base.py", line 315, in fld_whole
  File "C:\Users\landlord\AppData\Roaming\Anki2\addons\wquery\service\base.py", line 315, in fld_whole
        html = self.get_html()
html = self.get_html()
  File "C:\Users\landlord\AppData\Roaming\Anki2\addons\wquery\service\base.py", line 324, in get_html
  File "C:\Users\landlord\AppData\Roaming\Anki2\addons\wquery\service\base.py", line 324, in get_html
        result = self.builder.mdx_lookup(self.word)
result = self.builder.mdx_lookup(self.word)
  File "C:\Users\landlord\AppData\Roaming\Anki2\addons\wquery\libs\mdict\mdict_query.py", line 311, in mdx_lookup
  File "C:\Users\landlord\AppData\Roaming\Anki2\addons\wquery\libs\mdict\mdict_query.py", line 311, in mdx_lookup
        indexes = self.lookup_indexes(self._mdx_db, keyword, ignorecase)
indexes = self.lookup_indexes(self._mdx_db, keyword, ignorecase)
  File "C:\Users\landlord\AppData\Roaming\Anki2\addons\wquery\libs\mdict\mdict_query.py", line 294, in lookup_indexes
  File "C:\Users\landlord\AppData\Roaming\Anki2\addons\wquery\libs\mdict\mdict_query.py", line 294, in lookup_indexes
        keyword)
keyword)
UnicodeEncodeErrorUnicodeEncodeError: : 'ascii' codec can't encode character u'\xfc' in position 1: ordinal not in range(128)'ascii' codec can't encode character u'\xfc' in position 1: ordinal not in range(128)
finalion commented 7 years ago

@HosseinAlipour Thank you very much. This is a bug and I have fixed, please update!

finalion commented 7 years ago

If it is fixed, please close it.