Skip to content

[api_bluray] BUG: invalid literal for long() with base 10: '1989-2019' #2407

@girtsl

Description

@girtsl

Expected behaviour:

Release dates for movies that presumably produce multiple matches on blu-ray.com (e.g. remakes) are correctly resolved/estimated.

Actual behaviour:

Flexget crashes when it gets a year range back from blu-ray.com.

Steps to reproduce:

  • Add Pet Sematary (2019) to wanted_movies.
  • Make use of discover with any search plugin to look for movies from wanted_movies.

Config:

Doesn't seem to be very relevant.

Log:

BUG: Unhandled error in plugin discover: invalid literal for long() with base 10: '1989-2019' (click to expand)
2019-06-04 08:22 DEBUG    est_released  download-movies-2160 Pet Sematary (2019)
2019-06-04 08:22 DEBUG    est_movies_bluray download-movies-2160 Searching Blu-ray.com for release date of Pet Sematary (2019)
2019-06-04 08:22 DEBUG    api_bluray    download-movies-2160 Cache has expired for Pet Sematary, attempting to refresh from blu-ray.com.
2019-06-04 08:22 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'Pet Sematary', u'_': '1559625777990'}, u'timeout': 30}
2019-06-04 08:22 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'_': '1559625777990'}, u'timeout': 30}
2019-06-04 08:22 CRITICAL task          download-movies-2160 BUG: Unhandled error in plugin discover: invalid literal for long() with base 10: '1989-2019'
2019-06-04 08:22 CRITICAL manager       download-movies-2160 An unexpected crash has occurred. Writing crash report to /home/osmc/.flexget/crash_report.2019.06.04.082258649501.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.4
2019-06-04 08:22 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)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/internal/api_bluray.py", line 96, in <lambda>
    search_results, key=lambda k: extract_release_date(k)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/internal/api_bluray.py", line 46, in extract_release_date
    return date(int(bluray_entry['year']), 12, 31)
  File "/usr/local/lib/python2.7/dist-packages/future/types/newint.py", line 76, in __new__
    return super(newint, cls).__new__(cls, val)
ValueError: invalid literal for long() with base 10: '1989-2019'
2019-06-04 08:22 WARNING  task          download-movies-2160 Aborting task (plugin: discover)

Additional information:

  • FlexGet version: 2.21.4
  • Python version: 2.7.13
  • Installation method: pip
  • Using daemon (yes/no): yes
  • OS and version: OSMC

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions