2013-10-01, 11:39
Hi, I am having a problem with the output of this query.
This is what I get:
The word is supposed to be "Carnivàle'. Whenever I try and use the 'file' entry I get this error:
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe0' in position 115: ordinal not in range(128)
The "solutions" I can find for this involve dealing with a string before it is used.
Code:
episode_request = {"jsonrpc": "2.0", "method": "VideoLibrary.GetEpisodes", "params": {"properties": ["season","episode","runtime", "resume","playcount", "tvshowid", "lastplayed", "file"]}, "id": "allTVEpisodes"}
This is what I get:
Code:
[{u'tvshowid': 1, u'episode': 5, u'resume': {u'position': 0, u'total': 0}, u'season': 1, u'lastplayed': u'2013-10-01 15:25:54', u'episodeid': 1, u'label': u'1x05. Babylon', u'file': u'C:\\TV Shows\\Carniv\xe0le\\Season1\\Carniv\xe0le.S01E05.mkv', u'playcount': 0, u'runtime': 3600}]
The word is supposed to be "Carnivàle'. Whenever I try and use the 'file' entry I get this error:
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe0' in position 115: ordinal not in range(128)
The "solutions" I can find for this involve dealing with a string before it is used.