ngovil21 / RequestChannel.bundle

Request Channel - A Plex Channel to create requests
158 stars 22 forks source link

Plugin not responding #81

Closed bjostad closed 6 years ago

bjostad commented 6 years ago

I have an issue with Radarr though Sonarr is still working. In the logs there is the following trace:

2018-02-28 21:02:20,664 (1a70) :  DEBUG (runtime:924) - Response: [200] MediaContainer, 2251 bytes
2018-02-28 21:02:20,680 (d50) :  DEBUG (runtime:717) - Handling request GET /video/requestchannel/36972c4738c50f44ac5f200585152ac6/sendtoradarr?callback=%2Fvideo%2Frequestchannel%2F36972c4738c50f44ac5f200585152ac6%2Fviewrequest%3Ftoken_hash%3D__NONE__%26req_id%3D407451%26req_type%3Dmovie&movie_id=xxx
2018-02-28 21:02:20,680 (d50) :  DEBUG (runtime:814) - Found route matching /video/requestchannel/36972c4738c50f44ac5f200585152ac6/sendtoradarr
2018-02-28 21:02:20,680 (d50) :  DEBUG (networking:166) - Requesting 'http://192.168.1.127:7878/api/movie'
2018-02-28 21:02:21,709 (d50) :  DEBUG (networking:166) - Requesting 'http://192.168.1.127:7878/api/Profile'
2018-02-28 21:02:21,724 (d50) :  DEBUG (networking:166) - Requesting 'http://192.168.1.127:7878/api/Rootfolder'
2018-02-28 21:02:21,895 (d50) :  DEBUG (logkit:13) - Profile id: 6
2018-02-28 21:02:21,895 (d50) :  DEBUG (networking:166) - Requesting 'http://192.168.1.127:7878/api/movies/Lookup/tmdb?tmdbId=xxx'
2018-02-28 21:02:21,895 (d50) :  ERROR (networking:219) - Error opening URL 'http://192.168.1.127:7878/api/movies/Lookup/tmdb?tmdbId=xxx'
2018-02-28 21:02:21,895 (d50) :  ERROR (logkit:22) - Traceback (most recent call last):
  File "C:\Users\Administrator\AppData\Local\Plex Media Server\Plug-ins\RequestChannel.bundle\Contents\Code\api\Radarr.py", line 100, in lookupMovieId
    return JSON.ObjectFromURL(url=url, headers={'X-Api-Key': RADARR_API})
  File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-6de959918\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\api\parsekit.py", line 145, in ObjectFromURL
    method=method,
  File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-6de959918\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\api\networkkit.py", line 67, in _http_request
    req = self._core.networking.http_request(url, *args, **kwargs)
  File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-6de959918\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\components\networking.py", line 370, in http_request
    return HTTPRequest(self._core, url, data, h, url_cache, encoding, errors, timeout, immediate, sleep, opener, follow_redirects, method)
  File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-6de959918\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\components\networking.py", line 141, in __init__
    self.load()
  File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-6de959918\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\components\networking.py", line 181, in load
    f = self._opener.open(req, timeout=self._timeout)
  File "C:\Program Files (x86)\Plex\Plex Media Server\python27.zip\urllib2.py", line 435, in open
    response = meth(req, response)
  File "C:\Program Files (x86)\Plex\Plex Media Server\python27.zip\urllib2.py", line 548, in http_response
    'http', request, response, code, msg, hdrs)
  File "C:\Program Files (x86)\Plex\Plex Media Server\python27.zip\urllib2.py", line 473, in error
    return self._call_chain(*args)
  File "C:\Program Files (x86)\Plex\Plex Media Server\python27.zip\urllib2.py", line 407, in _call_chain
    result = func(*args)
  File "C:\Program Files (x86)\Plex\Plex Media Server\python27.zip\urllib2.py", line 556, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 404: Not Found

2018-02-28 21:02:21,895 (d50) :  CRITICAL (core:574) - Exception (most recent call last):
  File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-6de959918\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\components\runtime.py", line 843, in handle_request
    result = f(**d)
  File "C:\Users\Administrator\AppData\Local\Plex Media Server\Plug-ins\RequestChannel.bundle\Contents\Code\Session.py", line 1633, in SendToRadarr
    lookup = Radarr.lookupMovieId(movie_id, imdb=movie_id.startswith('tt'))
  File "C:\Users\Administrator\AppData\Local\Plex Media Server\Plug-ins\RequestChannel.bundle\Contents\Code\api\Radarr.py", line 103, in lookupMovieId
    Log.Debug("Options: " + str(options))
NameError: global name 'options' is not defined

The other issues i have seen seem related to the IP of the request and that is fine for mine.

bjostad commented 6 years ago

Postman using the URl http://192.168.1.127:7878/api/movies/Lookup/tmdb?tmdbId=###### (real id tested of course) X-API-KEY is included

returns

{
    "message": "NotFound"
}
bjostad commented 6 years ago

looking closer at the trace and it looks like even though it is using a TMDB id it is attempting the IMDB lookup @ line 96 of radarr.py

ngovil21 commented 6 years ago

What version of Radarr are you running?

bjostad commented 6 years ago

The version is 0.2.0.980

ngovil21 commented 6 years ago

Should be fixed now by 79ca4d91d3282e19648a31ad21a0612590a8a4e5

bjostad commented 6 years ago

Confirmed fixed. Pushed the latest version and everything is working. Thanks!