vlmaksime / weather.gismeteo

Gismeteo Weather Forecast for KODI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

KODI Exception - UnicodeEncodeError (surrogates not allowed)

Gen1usCat opened this issue · comments

commented

KODI 19

Error Type: <class 'UnicodeEncodeError'>
Error Contents: 'utf-8' codec can't encode character '\udca0' in position 11182: surrogates not allowed
Traceback (most recent call last):
  File "*/.kodi/addons/weather.gismeteo/resources/libs/simpleplugin.py", line 366, in __getitem__
    return pickle.loads(bytes(raw_item))
  TypeError: string argument without an encoding
---
  File "*/.kodi/addons/weather.gismeteo/resources/libs/simpleplugin.py", line 368, in __getitem__
    return pickle.loads(bytes(raw_item, 'utf-8'))
  UnicodeEncodeError: 'utf-8' codec can't encode character '\udca0' in position 11182: surrogates not allowed

To resolve the issue in the file weather.gismeteo/resources/libs/simpleplugin.py on line 368 must be changed to
return pickle.loads(bytes(raw_item, 'utf-8', errors='surrogateescape'))

confirmed from my side. the same error/stacktrace, and this change are fixing it.

i can confirm the fix is working also on my side.
PLease push it to the kodi repo.

thx

I've already done a PR with this changes, but it hasn't been accepted yet.
xbmc/repo-scripts#1972
xbmc/repo-scripts#1973

Thx a lot.
Hope they get 's merged soon