kodi 'ascii' codec can't encode character u'\u0159' on arm
maybe somebody will know where is the problem

when i run code below

def notify(self, text, error=False):
  icon = 'DefaultIconError.png' if error else ''
  xbmc.executebuiltin('Notification("%s","%s",5000, %s)' % (self._addon.getAddonInfo('name'), text, icon))

self.notify(self._addon.getLocalizedString(e.id), True)

it runs ok on win64 platform but when i run it on arm i'm getting

Error Contents: 'ascii' codec can't encode character u'\u0159' in position 32: ordinal not in range(128) Traceback (most recent call last):
File "/service.py", line 99, in tick self.notify(self._addon.getLocalizedString(e.id), True)
File "l/service.py", line 24, in notify xbmc.executebuiltin('Notification("%s","%s",5000, %s)' % (self._addon.getAddonInfo('name'), text, icon))

maybe i get it wrong but how is posiible that python use ascii string on arm and unicode on others
What is your text that fails? Anyway , a good rule of thumb is to use unicode strings for all your text and encode them to utf-8 before suppluying to Kodi .
Raspberry PI 2 + LibreELEC 8 (Kodi 17)
Samsung Galaxy Tab A 10.1 + Kodi 17 for Android
Thread Rating:
  • 0 Vote(s) - 0 Average

Logout Mark Read Team Forum Stats Members Help
kodi 'ascii' codec can't encode character u'\u0159' on arm00