nosmokingbandit / Watcher3

Other
279 stars 59 forks source link

post processing stopped working #253

Open phynias opened 6 years ago

phynias commented 6 years ago

Before submitting an issue...

Provide all information requested below. Issues without adequate information will be closed without response.

Commit: 22a68e0d6af5a07c910b3330d03649db243922a2 Operating System: freebsd Python Version [python -V]: 3.6.1 What happened: post processing has stopped working. from sabnzbd script it get a 500 error and then the log i sent you. ** Logs: emailed

nilsbebelaar commented 6 years ago

I am having the same issue, below are my logs. Feel free to ask for more info if needed.

As far as I can tell the post processor does find the correct data from imdb, but then just crashes.

Any thoughts?

INFO [2018-06-05 23:32:53,368] CPTaskScheduler._task.265: == Finished Scheduled Task: PostProcessing Scan ==
KeyError: 'filters'
filters = json.loads(movie_details['filters'])
File "/srv/Watcher3/core/searchresults.py", line 70, in score
search_result = searchresults.score([search_result], imported=True)[0]
File "/srv/Watcher3/core/library.py", line 909, in searchresults
if Manage.searchresults(data['guid'], 'Finished', movie_info=data):
File "/srv/Watcher3/core/postprocessing.py", line 485, in complete
response = self.complete(data)
File "/srv/Watcher3/core/postprocessing.py", line 200, in default
pp.default(**d)
File "/srv/Watcher3/core/scheduler.py", line 129, in scan_directory
self.task()
File "/srv/Watcher3/core/cp_plugins/taskscheduler.py", line 254, in _task
Traceback (most recent call last):
WARNING [2018-06-05 23:32:53,358] CPTaskScheduler._task.256: Scheduled Task PostProcessing Scan Failed:
INFO [2018-06-05 23:32:53,358] core.searchresults.score.38: Scoring 1 releases.
INFO [2018-06-05 23:32:53,357] core.searchresults.generate_simulacrum.446: Creating "fake" search result for imported movie The Layover
INFO [2018-06-05 23:32:53,357] core.library.searchresults.897: Guid postprocessing5468652e4c61796f not found in SEARCHRESULTS, attempting to create entry.
INFO [2018-06-05 23:32:53,356] core.library.searchresults.884: Marking guid postprocessing5468652e4c61796f as Finished.
INFO [2018-06-05 23:32:53,356] core.postprocessing.complete.481: Marking guid as Finished.
INFO [2018-06-05 23:32:53,355] core.postprocessing.default.198: Post-processing as Complete.
INFO [2018-06-05 23:32:52,876] core.movieinfo._search_tmdbid.157: Searching TMDB https://api.themoviedb.org/3/movie/339404?language=en-US&append_to_response=alternative_titles,external_ids,release_dates
INFO [2018-06-05 23:32:52,876] core.movieinfo._search_tmdbid.153: Searching TheMovieDB for TMDB ID: 339404.
INFO [2018-06-05 23:32:52,425] core.movieinfo._search_title.97: Searching TMDB https://api.themoviedb.org/3/search/movie?page=1&include_adult=false&query=the layover&year=2017
INFO [2018-06-05 23:32:52,425] core.movieinfo._search_title.86: Searching TheMovieDB for title: The Layover 2017.
INFO [2018-06-05 23:32:52,425] core.movieinfo.search.59: Searching TheMovieDB for The Layover 2017
INFO [2018-06-05 23:32:52,416] core.library.parse_media.450: Parsing codec data from file /media/Films_Series/Completed/Films/The.Layover.2017.1080p.WEB-DL.DD5.1.H264-FGT/The.Layover.2017.1080p.WEB-DL.DD5.1.H264-FGT.mkv.
INFO [2018-06-05 23:32:52,416] core.library.parse_filename.512: Found {'title': 'The Layover', 'resolution': '1080p', 'release_name': 'The.Layover.2017.1080p.WEB-DL.DD5.1.H264-FGT', 'codec': 'H264', 'year': 2017, 'quality': 'WEB-DL', 'audio': 'DD5.1', 'group': 'FGT'} in filename.
INFO [2018-06-05 23:32:52,416] core.library.parse_filename.504: Parsing directory name for movie information: The.Layover.2017.1080p.WEB-DL.DD5.1.H264-FGT.
INFO [2018-06-05 23:32:52,415] core.library.from_file.380: Gathering metadata for /media/Films_Series/Completed/Films/The.Layover.2017.1080p.WEB-DL.DD5.1.H264-FGT/The.Layover.2017.1080p.WEB-DL.DD5.1.H264-FGT.mkv.
INFO [2018-06-05 23:32:52,415] core.postprocessing.get_movie_info.334: Unable to find local data for release. Using only data found from file.
INFO [2018-06-05 23:32:52,415] core.postprocessing.get_movie_info.316: Unable to find local release info by release name.
INFO [2018-06-05 23:32:52,414] core.postprocessing.get_movie_info.311: Searching local database for release name The.Layover.2017.1080p.WEB-DL.DD5.1.H264-FGT
INFO [2018-06-05 23:32:52,414] core.postprocessing.get_movie_info.295: Guid not found.
INFO [2018-06-05 23:32:52,414] core.postprocessing.get_movie_info.292: Unable to find local release info by guid.
INFO [2018-06-05 23:32:52,412] core.postprocessing.get_movie_info.287: Searching local database for guid.
INFO [2018-06-05 23:32:52,412] core.postprocessing.default.190: Gathering release information.
INFO [2018-06-05 23:32:52,412] core.postprocessing.get_movie_file.265: Largest file in directory /media/Films_Series/Completed/Films/The.Layover.2017.1080p.WEB-DL.DD5.1.H264-FGT is /The.Layover.2017.1080p.WEB-DL.DD5.1.H264-FGT.mkv, processing this file.
INFO [2018-06-05 23:32:52,412] core.postprocessing.get_movie_file.240: Finding movie file.
INFO [2018-06-05 23:32:52,411] core.postprocessing.default.158: #################################
INFO [2018-06-05 23:32:52,411] core.postprocessing.default.157: Post-processing request received.
nosmokingbandit commented 6 years ago

Should be good to go in 53a0d3bd57034618e45583cfdfbaae3166b2c20f.

On Mon, Jun 4, 2018 at 12:27 AM phynias notifications@github.com wrote:

Before submitting an issue...

-

Enable debug logging in settings/server.

Repeat the actions required to reproduce the error.

Provide all information requested below. Issues without adequate information will be closed without response.

Commit: 22a68e0 https://github.com/nosmokingbandit/Watcher3/commit/22a68e0d6af5a07c910b3330d03649db243922a2 Operating System: freebsd Python Version [python -V]: 3.6.1 What happened: post processing has stopped working. from sabnzbd script it get a 500 error and then the log i sent you. ** Logs: emailed

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/nosmokingbandit/Watcher3/issues/253, or mute the thread https://github.com/notifications/unsubscribe-auth/AKX1ScDdNWwDW_tifBPxsOESg-ch2qScks5t5LdNgaJpZM4UYbg6 .

phynias commented 6 years ago

broken again in the latest commit again.

INFO [2018-08-16 21:49:51,799] core.postprocessing.default.156: #################################
INFO [2018-08-16 21:49:51,815] core.postprocessing.default.157: Post-processing request received.
INFO [2018-08-16 21:49:51,816] core.postprocessing.default.158: #################################
INFO [2018-08-16 21:49:51,816] core.postprocessing.map_remote.622: Changing remote path from /media/couchpotato/Stargate.The.Ark.Of.Truth.2008.1080p.Bluray.DTS.x264-eViAN-4P to /mnt/incoming/Stargate.The.Ark.Of.Truth.$
INFO [2018-08-16 21:49:51,816] core.postprocessing.get_movie_file.236: Finding movie file.
INFO [2018-08-16 21:49:51,818] core.postprocessing.get_movie_file.260: Largest file in directory /mnt/incoming/Stargate.The.Ark.Of.Truth.2008.1080p.Bluray.DTS.x264-eViAN-4P is /mnt/incoming/Stargate.The.Ark.Of.Truth.2$
INFO [2018-08-16 21:49:51,818] core.postprocessing.default.186: Gathering release information.
INFO [2018-08-16 21:49:51,818] core.postprocessing.get_movie_info.284: Searching local database for guid.
INFO [2018-08-16 21:49:51,845] core.postprocessing.get_movie_info.289: Unable to find local release info by guid.
INFO [2018-08-16 21:49:51,845] core.postprocessing.get_movie_info.292: Guid not found.
INFO [2018-08-16 21:49:51,845] core.postprocessing.get_movie_info.294: Searching local database for downloadid.
INFO [2018-08-16 21:49:51,850] core.postprocessing.get_movie_info.303: Unable to find local release info by downloadid.
INFO [2018-08-16 21:49:51,850] core.postprocessing.get_movie_info.308: Searching local database for release name Stargate.The.Ark.Of.Truth.2008.1080p.Bluray.DTS.x264-eViAN-4P
INFO [2018-08-16 21:49:51,856] core.postprocessing.get_movie_info.313: Unable to find local release info by release name.
INFO [2018-08-16 21:49:51,856] core.postprocessing.get_movie_info.331: Unable to find local data for release. Using only data found from file.
INFO [2018-08-16 21:49:51,856] core.postprocessing.default.194: Post-processing as Complete.
INFO [2018-08-16 21:49:51,856] core.postprocessing.complete.478: Marking guid as Finished.
INFO [2018-08-16 21:49:51,856] core.postprocessing.complete.525: Imdbid not supplied or found, unable to update Movie status.
ERROR [2018-08-16 21:49:51,856] cherrypy.error.34511872968.error.219: [16/Aug/2018:21:49:51] HTTP
Traceback (most recent call last):
  File "/usr/local/Watcher3/lib/cherrypy/_cprequest.py", line 670, in respond
    response.body = self.handler()
  File "/usr/local/Watcher3/lib/cherrypy/lib/encoding.py", line 220, in __call__
    self.body = self.oldhandler(*args, **kwargs)
  File "/usr/local/Watcher3/lib/cherrypy/lib/jsontools.py", line 61, in json_handler
    value = cherrypy.serving.request._json_inner_handler(*args, **kwargs)
  File "/usr/local/Watcher3/lib/cherrypy/_cpdispatch.py", line 60, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/usr/local/Watcher3/core/postprocessing.py", line 196, in default
    response = self.complete(data)
  File "/usr/local/Watcher3/core/postprocessing.py", line 529, in complete
    data.update(Metadata.convert_to_db(data))
  File "/usr/local/Watcher3/core/library.py", line 556, in convert_to_db
    logging.info('Converting movie metadata to database structure for {}.'.format(movie['title']))
KeyError: 'title'
INFO [2018-08-16 21:49:51,929] cherrypy.error.34511872968.error.219: [16/Aug/2018:21:49:51] HTTP
Request Headers:
  Remote-Addr: 192.168.1.203
  ACCEPT-ENCODING: identity
  HOST: 192.168.1.212:9090
  CONNECTION: close
  USER-AGENT: Mozilla/5.0
  Content-Type: application/x-www-form-urlencoded
  Content-Length: 378
xGBHxPegasus commented 6 years ago

Get the same on mine, I thought it was something to do with the file so chalked it up to that.

Apparently not.

nosmokingbandit commented 6 years ago

Are you log lines truncated? I ask because of the line that ends with /mnt/incoming/Stargate.The.Ark.Of.Truth.2$.

It seems like it isn't getting the title from the movie file, which should be impossible since the title has a default value set.

nosmokingbandit commented 6 years ago

Ignore that, should be ok in 6d964a9bdf1b8951f285119c10a0c7d7f7bb8e23

To make a long story slightly less long, when I test I run some manual processing since I can't really download a movie and have a download client send a request every time I change something in the processing methods. Except that things are handled slightly differently if the movie is already in the db or if it is being added to Watcher as it is being processed and that isn't always covered by manual processing requests.