1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-11-17 23:05:11 -05:00
SickRage/lib
loginfliggle 62a7d9850c Update tvrage_api.py
Bugfix by viperidae

Reference:
---------------
Reference: https://sickrage.tv/forums/forum/help-support/bug-issue-reports/6224-there-was-an-error-with-the-xml-retrieved-from-tvrage-com

Quote:
----------
Had a look at the code and the xml documents...

It looks like the problem is caused by an empty <genre /> element in Results/shows/show/genres/
Line 459 of tvrage_api.py (it's 460 in my track in the previous post because of the debug statements I put in)

I assume it's because value is NoneType, gets replaced by a [NoneType] list and then tries to call '|'.join([NoneType]) when it was expecting a list of strings.

I changed this to the following and the problem appears to be resolved

Syslog extract:
----------------------
tvrage_error: There was an error with the XML retrieved from tvrage.com
First try emptying the cache folder at..
C:\Users\Josh\Documents\Programs\SickRage\cache\indexers\TVRage
If this does not resolve the issue, please try again later. If the error persists, report a bug on


2014-08-09 00:43:25 INFO     SEARCHQUEUE-BACKLOG-74608 :: [NMatrix] :: Searching for episodes we need from Top Gear Season 21
2014-08-09 00:43:25 DB       SEARCHQUEUE-BACKLOG-74608 :: [NMatrix] :: cache.db: SELECT * FROM [nmatrix] WHERE indexerid = ? AND season = ? AND episodes LIKE ? with args [74608, 21, '%|2|%']
2014-08-09 00:43:25 DB       SEARCHQUEUE-BACKLOG-74608 :: [NMatrix] :: cache.db: UPDATE lastSearch SET time = ? WHERE provider = ? with args [1407559405, 'nmatrix']
2014-08-09 00:43:25 DB       SEARCHQUEUE-BACKLOG-74608 :: [NMatrix] :: cache.db: INSERT INTO lastSearch (time, provider) VALUES (?, ?) with args [1407559405, 'nmatrix']
2014-08-09 00:43:25 DB       SEARCHQUEUE-BACKLOG-74608 :: [NMatrix] :: sickbeard.db: SELECT * FROM indexer_mapping WHERE indexer_id = ? AND indexer = ? with args [74608, 1]
2014-08-09 00:43:25 ERROR    SEARCHQUEUE-BACKLOG-74608 :: [NMatrix] :: Error while searching NMatrix, skipping: There was an error with the XML retrieved from tvrage.com
First try emptying the cache folder at..
C:\Users\Josh\Documents\Programs\SickRage\cache\indexers\TVRage
If this does not resolve the issue, please try again later. If the error persists, report a bug on

2014-08-09 00:43:25 DEBUG    SEARCHQUEUE-BACKLOG-74608 :: [NMatrix] :: Traceback (most recent call last):
  File "C:\Users\Josh\Documents\Programs\SickRage\sickbeard\search.py", line 428, in searchProviders
    searchResults = curProvider.findSearchResults(show, season, episodes, search_mode, manualSearch)
  File "C:\Users\Josh\Documents\Programs\SickRage\sickbeard\providers\generic.py", line 264, in findSearchResults
    for curString in self._get_episode_search_strings(epObj):
  File "C:\Users\Josh\Documents\Programs\SickRage\sickbeard\providers\newznab.py", line 133, in _get_episode_search_strings
    rid = helpers.mapIndexersToShow(ep_obj.show)[2]
  File "C:\Users\Josh\Documents\Programs\SickRage\sickbeard\helpers.py", line 1178, in mapIndexersToShow
    mapped_show = t[showObj.name]
  File "C:\Users\Josh\Documents\Programs\SickRage\lib\tvrage_api\tvrage_api.py", line 675, in __getitem__
    selected_series = self._getSeries(key)
  File "C:\Users\Josh\Documents\Programs\SickRage\lib\tvrage_api\tvrage_api.py", line 566, in _getSeries
    allSeries = self.search(series)
  File "C:\Users\Josh\Documents\Programs\SickRage\lib\tvrage_api\tvrage_api.py", line 557, in search
    seriesEt = self._getetsrc(self.config['url_getSeries'], self.config['params_getSeries'])
  File "C:\Users\Josh\Documents\Programs\SickRage\lib\tvrage_api\tvrage_api.py", line 500, in _getetsrc
    raise tvrage_error(errormsg)
2014-08-09 02:36:21 -04:00
..
adba Possible fix for stacked provider names during backlog search. 2014-07-17 23:16:18 -07:00
backports Replaced cherrypy with tornado which helped resolve our memory leak issue. 2014-06-14 20:56:15 -07:00
bencode Code Clean up and regex fix for "no repeats" error (reverted from commit 8ecd5a196d) 2014-03-20 11:03:22 -07:00
bs4 Welcome to our SickBeard-TVRage Edition ... 2014-03-09 22:39:12 -07:00
cachecontrol Updated our cache code. 2014-04-22 23:24:08 -07:00
chardet Added daily searcher to check for and snatch daily new releases for current active watched shows. User settable interval can be found in search config menu plus forcing a daily search can be done from Manage Searches menu. 2014-05-14 21:16:46 -07:00
dateutil Fixed issues with search results not being snatched when searching shows with custom quality settings. 2014-05-15 14:43:57 -07:00
enzyme Patches the enzyme lib to allow the detection of subtitles embedded into mp4/m4v files 2014-07-06 12:02:02 +02:00
feedcache Added cookie support to custom torrent provider 2014-05-25 19:19:45 +02:00
feedparser Added RSS feedparser lib to process custom torrent RSS feeds. 2014-04-25 16:41:47 -07:00
fuzzywuzzy Added in regex matching with fuzzy matching. 2014-05-31 03:35:11 -07:00
growl Welcome to our SickBeard-TVRage Edition ... 2014-03-09 22:39:12 -07:00
guessit Welcome to our SickBeard-TVRage Edition ... 2014-03-09 22:39:12 -07:00
hachoir_core Welcome to our SickBeard-TVRage Edition ... 2014-03-09 22:39:12 -07:00
hachoir_metadata Welcome to our SickBeard-TVRage Edition ... 2014-03-09 22:39:12 -07:00
hachoir_parser Welcome to our SickBeard-TVRage Edition ... 2014-03-09 22:39:12 -07:00
html5lib Further improved memory handling of bs4 for torrent providers. 2014-07-21 16:01:46 -07:00
httplib2 Welcome to our SickBeard-TVRage Edition ... 2014-03-09 22:39:12 -07:00
imdb Upgraded IMDBpy and improved performance of it. 2014-06-07 08:33:18 -07:00
jsonrpclib Fixed issues with searching for air by date shows and sports. 2014-04-30 06:49:50 -07:00
lockfile Fixed startup/restart/shutdown issues on Windows, Linux, FreeBSD platforms tested. 2014-07-02 11:51:14 -07:00
oauth2 Welcome to our SickBeard-TVRage Edition ... 2014-03-09 22:39:12 -07:00
pynma Welcome to our SickBeard-TVRage Edition ... 2014-03-09 22:39:12 -07:00
pysrt Updated sumbliminal. 2014-04-23 20:22:21 -07:00
pythontwitter Welcome to our SickBeard-TVRage Edition ... 2014-03-09 22:39:12 -07:00
requests Fixes issue #161 2014-04-28 16:04:09 -07:00
rtorrent Fixed infinite loop in lib/rtorrent 2014-05-28 15:35:56 +00:00
shove Reverted back to using Shove+SQLAlchemy for storing persistent object data to avoid any more DB corruption errors. 2014-07-15 11:40:40 -07:00
simplejson Welcome to our SickBeard-TVRage Edition ... 2014-03-09 22:39:12 -07:00
socks Welcome to our SickBeard-TVRage Edition ... 2014-03-09 22:39:12 -07:00
sqlalchemy Reverted back to using Shove+SQLAlchemy for storing persistent object data to avoid any more DB corruption errors. 2014-07-15 11:40:40 -07:00
subliminal Fixed IndexError: list index out of range issue 2014-08-09 01:43:02 +00:00
tmdb_api Improved TVRage API code to now include show/episode summaries and fanart. 2014-03-13 20:07:15 -07:00
trakt Trakt method, error checking, remove series 2014-08-09 00:07:17 +01:00
tvdb_api Fixed issue with reverts to master on startup due to bug in version checker. 2014-07-28 09:03:07 -07:00
tvrage_api Update tvrage_api.py 2014-08-09 02:36:21 -04:00
unidecode Welcome to our SickBeard-TVRage Edition ... 2014-03-09 22:39:12 -07:00
unrar2 Fix for unrar2 2014-05-12 13:56:22 -07:00
__init__.py Welcome to our SickBeard-TVRage Edition ... 2014-03-09 22:39:12 -07:00
certgen.py Welcome to our SickBeard-TVRage Edition ... 2014-03-09 22:39:12 -07:00
configobj.py Welcome to our SickBeard-TVRage Edition ... 2014-03-09 22:39:12 -07:00
MultipartPostHandler.py Welcome to our SickBeard-TVRage Edition ... 2014-03-09 22:39:12 -07:00
pkg_resources.py Added in missing libs 2014-05-15 06:01:45 -07:00
profilehooks.py Welcome to our SickBeard-TVRage Edition ... 2014-03-09 22:39:12 -07:00
six.py Added in missing libs 2014-05-15 06:01:45 -07:00
xmltodict.py Update imdbpy libs to v5.0 2014-05-28 23:09:38 -07:00