metabaron / Gomiso-XBMC

Gomiso integration within XBMC
GNU General Public License v2.0
5 stars 2 forks source link

While watching a serie: 'ascii' codec can't encode characters #3

Open metabaron opened 13 years ago

metabaron commented 13 years ago

22:16:46 T:5788 M:2381524992 ERROR: Error Type: exceptions.UnicodeEncodeError 22:16:46 T:5788 M:2381524992 ERROR: Error Contents: 'ascii' codec can't encode characters in position 29-30: ordinal not in range(128) 22:16:46 T:5788 M:2381221888 ERROR: Traceback (most recent call last): File "C:\Users\Stephan\AppData\Roaming\XBMC\addons\script.gomiso\default.py", line 186, in ? json_result = json.loads(letsGo.findMedia(showname, 'tv', 1)) File "C:\Users\Stephan\AppData\Roaming\XBMC\addons\script.gomiso\resources\lib\gomiso.py", line 214, in findMedia resp, token = client.request('http://gomiso.com/api/oauth/v1/media.json?q=' + urllib.quote(title) + '&count=' + str(count) + '&kind=' + media_type[kind], method='GET') File "C:\Users\Stephan\AppData\Roaming\XBMC\addons\script.gomiso\resources\lib\oauth2.py", line 677, in request uri = req.to_url() File "C:\Users\Stephan\AppData\Roaming\XBMC\addons\script.gomiso\resources\lib\oauth2.py", line 439, in to_url url = (scheme, netloc, path, params, File "special://xbmc/system/python/Lib\urllib.py", line 1187, in urlencode l.append(k + '=' + quote_plus(str(elt))) UnicodeEncodeError: 'ascii' codec can't encode characters in position 29-30: ordinal not in range(128)

This one occurred while watching a tv show. The file name is "Raumschiff Enterprise - Das nächste Jahrhundert - S05E21 - Eine hoffnungslose Romanze.avi". I've attached the .nfo file for this episode. I guess the issue is the show name, because your script never worked for this particular show (maybe the "ä" or the "-"??).

metabaron commented 13 years ago

Related NFO

Eine hoffnungslose Romanze 5 21 1992-04-27 Die Enterprise bringt den kriosianischen Botschafter Briam zu Friedensverhandlungen mit den Valtesern. Sein Gastgeschenk ist ein Metamorph: Eine wunderschöne, junge Frau, die sich nur den Wünschen eines Mannes widmet. Sie verdreht allen Männern an Bord den Kopf, auch Captain Picard. http://www.thetvdb.com/banners/episodes/71470/46628.jpg false |Gary Percante|Michael Piller| |Cliff Bole|René Echevarria| 6.3 Famke Janssen Tim O'Connor Max Grodenchik Mickey Cottrell Michael Snyder April Grace Patrick Stewart Jean-Luc Picard http://www.thetvdb.com/banners/actors/9690.jpg Jonathan Frakes William T. Riker http://www.thetvdb.com/banners/actors/9691.jpg Marina Sirtis Deanna Troi http://www.thetvdb.com/banners/actors/9687.jpg Michael Dorn Worf http://www.thetvdb.com/banners/actors/9692.jpg Brent Spiner Data http://www.thetvdb.com/banners/actors/9688.jpg Gates McFadden Beverly Crusher http://www.thetvdb.com/banners/actors/9694.jpg LeVar Burton Geordi LaForge http://www.thetvdb.com/banners/actors/9693.jpg Michelle Forbes Ro Laren http://www.thetvdb.com/banners/actors/85401.jpg Denise Crosby Tasha Yar http://www.thetvdb.com/banners/actors/85381.jpg Colm Meaney Miles O'Brien http://www.thetvdb.com/banners/actors/84611.jpg Wil Wheaton Wesley Crusher http://www.thetvdb.com/banners/actors/84601.jpg Whoopi Goldberg Guinan http://www.thetvdb.com/banners/actors/84591.jpg
metabaron commented 13 years ago

Since last update: 08:08:29 T:6840 M:1634291712 ERROR: Error Type: exceptions.KeyError 08:08:29 T:6840 M:1634299904 ERROR: Traceback (most recent call last): File "C:\Users\Stephan\AppData\Roaming\XBMC\addons\script.gomiso\default.py", line 186, in ? json_result = json.loads(letsGo.findMedia(showname, 'tv', 1)) File "C:\Users\Stephan\AppData\Roaming\XBMC\addons\script.gomiso\resources\lib\gomiso.py", line 214, in findMedia resp, token = client.request('http://gomiso.com/api/oauth/v1/media.json?q=' + urllib.quote(unicode(title, 'utf-8')) + '&count=' + str(count) + '&kind=' + media_type[kind], method='GET') File "special://xbmc/system/python/Lib\urllib.py", line 1117, in quote res = map(safe_map.getitem, s) KeyError: < unprintable unicode object >

metabaron commented 11 years ago

Sorry, still don't know exactly out to perfectly handle this issue :(