-
Notifications
You must be signed in to change notification settings - Fork 481
[api_bluray] BUG: can't compare datetime.datetime to datetime.date #2405
Copy link
Copy link
Closed
Description
Expected behaviour:
Release date that cannot be found on blu-ray.com is approximated to some sensible value.
Actual behaviour:
Flexget crashes when parsing response from blu-ray.com.
Steps to reproduce:
- Add Godzilla: King of the Monsters (2019) to
wanted_movies. - Make use of
discoverwith any search plugin to look for movies fromwanted_movies.
Config:
Doesn't seem to be very relevant.
Log:
BUG: Unhandled error in plugin discover: can't compare datetime.datetime to datetime.date (click to expand)
2019-06-03 18:30 DEBUG est_released download-movies-2160 Godzilla: King of the Monsters (2019)
2019-06-03 18:30 DEBUG est_movies_bluray download-movies-2160 Searching Blu-ray.com for release date of Godzilla: King of the Monsters (2019)
2019-06-03 18:30 DEBUG api_bluray download-movies-2160 Cache has expired for Godzilla: King of the Monsters, attempting to refresh from blu-ray.com.
2019-06-03 18:30 DEBUG utils.requests download-movies-2160 GETing URL http://m.blu-ray.com/quicksearch/search.php with args () and kwargs {u'allow_redirects': True, 'params': {u'country': u'ALL', u'section': u'bluraymovies', u'keyword': u'Godzilla: King of the Monsters', u'_': '1559575839055'}, u'timeout': 30}
2019-06-03 18:30 DEBUG utils.requests download-movies-2160 GETing URL http://m.blu-ray.com/countries.json.php with args () and kwargs {u'allow_redirects': True, 'params': {u'_': '1559575839055'}, u'timeout': 30}
2019-06-03 18:30 CRITICAL task download-movies-2160 BUG: Unhandled error in plugin discover: can't compare datetime.datetime to datetime.date
2019-06-03 18:30 CRITICAL manager download-movies-2160 An unexpected crash has occurred. Writing crash report to /home/osmc/.flexget/crash_report.2019.06.03.183039754664.log. Please verify you are running the latest version of flexget by using "flexget -V" from CLI or by using version_checker plugin at http://flexget.com/wiki/Plugins/version_checker. You are currently using version 2.21.3
2019-06-03 18:30 DEBUG manager download-movies-2160 Traceback:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/flexget/task.py", line 522, in __run_plugin
return method(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/flexget/event.py", line 23, in __call__
return self.func(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/input/discover.py", line 292, in on_task_input
entries = self.estimated(entries, estimation_mode)
File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/input/discover.py", line 183, in estimated
est_date = estimator.estimate(entry)
File "/usr/local/lib/python2.7/dist-packages/flexget/components/estimate_release/estimate_release.py", line 30, in estimate
estimate = estimator(entry)
File "/usr/local/lib/python2.7/dist-packages/flexget/components/estimate_release/estimators/est_movies_bluray.py", line 36, in estimate
movie = lookup(title=movie_name, year=movie_year, session=session)
File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/internal/api_bluray.py", line 234, in lookup
updated_movie = BlurayMovie(title=title, year=year)
File "<string>", line 4, in __init__
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/state.py", line 441, in _initialize_instance
manager.dispatch.init_failure(self, args, kwargs)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/langhelpers.py", line 68, in __exit__
compat.reraise(exc_type, exc_value, exc_tb)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/state.py", line 438, in _initialize_instance
return manager.original_init(*mixed[1:], **kwargs)
File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/internal/api_bluray.py", line 96, in __init__
search_results, key=lambda k: extract_release_date(k)
TypeError: can't compare datetime.datetime to datetime.date
2019-06-03 18:30 WARNING task download-movies-2160 Aborting task (plugin: discover)
Additional information:
- FlexGet version: 2.21.3
- Python version: 2.7.13
- Installation method: pip
- Using daemon (yes/no): yes
- OS and version: OSMC
It seems that this change might have broken it.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels