nosmokingbandit / Watcher3

Other
279 stars 60 forks source link

Add movie via RSS fails if no release_date #197

Open paulkoan opened 6 years ago

paulkoan commented 6 years ago

If you add a movie via RSS that has a valid ttnnnnnnnn id on both IMDB and TMDB, the movie will fail to add if it does not yet have a release date:

File "/home/share/apps/tv/Watcher3/core/rss/imdb.py", line 144, in sync_new_movies movie['year'] = movie['release_date'][:4] TypeError: 'NoneType' object is not subscriptable If you add the same movie through the interface, it adds without issue.

nosmokingbandit commented 6 years ago

The IMDB sync module has been completely re-written since you posted this issue (now uses CSV lists since IMDB disabled RSS lists). Can you check if this is still occurring?

paulkoan commented 6 years ago

Yes it does. It recognises that there is no release date, but adds it still:

INFO [2018-02-12 17:39:58,153] core.searcher.verify.60: {} does not yet have a home media release date.

I have retired my short lived imdbcsv2rss utility :)

nosmokingbandit commented 6 years ago

That log line is from the initial verification check (predb or release date), and is inconsequential. It isn't formatted correctly, so I'll fix that.

vincemarsters commented 6 years ago

I am seeing the same problem, and it crashes the rest of the import process too. The relevant section of the log file is below (with sample IMDB reference).


INFO [2018-02-25 20:37:11,512] core.movieinfo._search_imdbid.124: Searching TMDB https://api.themoviedb.org/3/find/tt4180298?language=en-US&external_source=imdb_id&append_to_response=alternative_titles,external_ids,release_dates
INFO [2018-02-25 20:37:12,109] core.rss.imdb.sync.74: Adding movie The Six Billion Dollar Man tt4180298 from IMDB watchlist.
WARNING [2018-02-25 20:37:12,109] CPTaskScheduler._task.256: Scheduled Task IMDB Sync Failed:
Traceback (most recent call last):
  File "/pathto/Watcher3/core/cp_plugins/taskscheduler.py", line 254, in _task
    self.task()
  File "/pathto/Watcher3/core/rss/imdb.py", line 75, in sync
    movie['year'] = movie['release_date'][:4]
KeyError: 'release_date'
nosmokingbandit commented 6 years ago

eb5ab9a0793100772328547884519b1b24c7b39c

That movie worked fine after this commit.

On Sun, Feb 25, 2018 at 3:53 PM, vincemarsters notifications@github.com wrote:

I am seeing the same problem, and it crashes the rest of the import process too. The relevant section of the log file is below (with sample IMDB reference).

INFO [2018-02-25 20:37:11,512] core.movieinfo._search_imdbid.124: Searching TMDB https://api.themoviedb.org/3/find/tt4180298?language=en-US&external_source=imdb_id&append_to_response=alternative_titles,external_ids,release_dates INFO [2018-02-25 20:37:12,109] core.rss.imdb.sync.74: Adding movie The Six Billion Dollar Man tt4180298 from IMDB watchlist. WARNING [2018-02-25 20:37:12,109] CPTaskScheduler._task.256: Scheduled Task IMDB Sync Failed: Traceback (most recent call last): File "/pathto/Watcher3/core/cp_plugins/taskscheduler.py", line 254, in _task self.task() File "/pathto/Watcher3/core/rss/imdb.py", line 75, in sync movie['year'] = movie['release_date'][:4] KeyError: 'release_date'```

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/nosmokingbandit/Watcher3/issues/197#issuecomment-368343613, or mute the thread https://github.com/notifications/unsubscribe-auth/AKX1SclBlTkNCBdiIKyqV11nW-oNW_WLks5tYchhgaJpZM4RmLu5 .