Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KODI Exception - UnicodeEncodeError (surrogates not allowed) #6

Closed
Gen1usCat opened this issue Feb 24, 2021 · 4 comments
Closed

KODI Exception - UnicodeEncodeError (surrogates not allowed) #6

Gen1usCat opened this issue Feb 24, 2021 · 4 comments

Comments

@Gen1usCat
Copy link

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'))

@IvanO-20
Copy link

IvanO-20 commented Mar 3, 2021

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

@popy2k14
Copy link

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

thx

@vlmaksime
Copy link
Owner

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

@popy2k14
Copy link

Thx a lot.
Hope they get 's merged soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants