Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'NoneType' object has no attribute 'check' #1353

Closed
Prince25 opened this issue Mar 30, 2021 · 9 comments
Closed

'NoneType' object has no attribute 'check' #1353

Prince25 opened this issue Mar 30, 2021 · 9 comments

Comments

@Prince25
Copy link

Describe the bug
Searching for subtitle(s) results in 'NoneType' object has no attribute 'check' error.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Wanted'
  2. Click on Series or Movies
  3. Click on any search for subtitles button
  4. See log

Expected behavior
Get some subtitles.

Screenshots

29/03/2021 04:01:53|INFO    |root                            |BAZARR is started and waiting for request on http://0.***.***.***:6767|
29/03/2021 04:40:28|INFO    |root                            |BAZARR is started and waiting for request on http://0.***.***.***:6767|
29/03/2021 05:02:16|INFO    |root                            |BAZARR All existing movie subtitles indexed from disk.|
29/03/2021 05:58:09|INFO    |root                            |BAZARR is started and waiting for request on http://0.***.***.***:6767|
29/03/2021 08:14:13|INFO    |root                            |BAZARR Finished searching for missing Movies Subtitles. Check History for more information.|
29/03/2021 08:19:27|INFO    |root                            |BAZARR Finished searching for missing Series Subtitles. Check History for more information.|
29/03/2021 09:53:31|INFO    |root                            |BAZARR is started and waiting for request on http://0.***.***.***:6767|
29/03/2021 12:26:51|INFO    |root                            |BAZARR Finished searching for missing Movies Subtitles. Check History for more information.|
29/03/2021 12:44:03|INFO    |root                            |BAZARR Finished searching for missing Series Subtitles. Check History for more information.|
29/03/2021 15:26:51|INFO    |root                            |BAZARR Finished searching for missing Movies Subtitles. Check History for more information.|
29/03/2021 15:44:03|INFO    |root                            |BAZARR Finished searching for missing Series Subtitles. Check History for more information.|
29/03/2021 18:26:51|INFO    |root                            |BAZARR Finished searching for missing Movies Subtitles. Check History for more information.|
29/03/2021 18:37:09|ERROR   |app                             |Exception on /api/movies [PATCH]|'Traceback (most recent call last):\n  File "/app/bazarr/../libs/flask/app.py", line 1949, in full_dispatch_request\n    rv = self.dispatch_request()\n  File "/app/bazarr/../libs/flask/app.py", line 1935, in dispatch_request\n    return self.view_functions[rule.endpoint](**req.view_args)\n  File "/app/bazarr/../libs/flask_restful/__init__.py", line 458, in wrapper\n    resp = resource(*args, **kwargs)\n  File "/app/bazarr/../libs/flask/views.py", line 89, in view\n    return self.dispatch_request(*args, **kwargs)\n  File "/app/bazarr/../libs/flask_restful/__init__.py", line 573, in dispatch_request\n    resp = meth(*args, **kwargs)\n  File "/app/bazarr/api.py", line 84, in wrapper\n    return actual_method(*args, **kwargs)\n  File "/app/bazarr/api.py", line 893, in patch\n    wanted_search_missing_subtitles_movies()\n  File "/app/bazarr/get_subtitle.py", line 1089, in wanted_search_missing_subtitles_movies\n    wanted_download_subtitles_movie(movie[\'path\'], i, count_movies)\n  File "/app/bazarr/get_subtitle.py", line 1025, in wanted_download_subtitles_movie\n    result = download_subtitle(path_mappings.path_replace_movie(movie[\'path\']),\n  File "/app/bazarr/get_subtitle.py", line 181, in download_subtitle\n    downloaded_subtitles = download_best_subtitles({video}, language_set, int(min_score), hi,\n  File "/app/bazarr/../libs/subliminal_patch/core.py", line 820, in download_best_subtitles\n    subtitles = pool.download_best_subtitles(pool.list_subtitles(video, languages - video.subtitle_languages),\n  File "/app/bazarr/../libs/subliminal_patch/core.py", line 462, in list_subtitles\n    for provider, provider_subtitles in executor.map(self.list_subtitles_provider, self.providers,\n  File "/usr/lib/python3.8/concurrent/futures/_base.py", line 611, in result_iterator\n    yield fs.pop().result()\n  File "/usr/lib/python3.8/concurrent/futures/_base.py", line 432, in result\n    return self.__get_result()\n  File "/usr/lib/python3.8/concurrent/futures/_base.py", line 388, in __get_result\n    raise self._exception\n  File "/usr/lib/python3.8/concurrent/futures/thread.py", line 57, in run\n    result = self.fn(*self.args, **self.kwargs)\n  File "/app/bazarr/../libs/subliminal_patch/core.py", line 448, in list_subtitles_provider\n    provider_subtitles = super(SZAsyncProviderPool, self).list_subtitles_provider(provider, video, languages)\n  File "/app/bazarr/../libs/subliminal_patch/core.py", line 148, in list_subtitles_provider\n    if not provider_registry[provider].check(video):\nAttributeError: \'NoneType\' object has no attribute \'check\''|
29/03/2021 18:41:31|ERROR   |app                             |Exception on /api/movies/subtitles [PATCH]|'Traceback (most recent call last):\n  File "/app/bazarr/../libs/flask/app.py", line 1949, in full_dispatch_request\n    rv = self.dispatch_request()\n  File "/app/bazarr/../libs/flask/app.py", line 1935, in dispatch_request\n    return self.view_functions[rule.endpoint](**req.view_args)\n  File "/app/bazarr/../libs/flask_restful/__init__.py", line 458, in wrapper\n    resp = resource(*args, **kwargs)\n  File "/app/bazarr/../libs/flask/views.py", line 89, in view\n    return self.dispatch_request(*args, **kwargs)\n  File "/app/bazarr/../libs/flask_restful/__init__.py", line 573, in dispatch_request\n    resp = meth(*args, **kwargs)\n  File "/app/bazarr/api.py", line 84, in wrapper\n    return actual_method(*args, **kwargs)\n  File "/app/bazarr/api.py", line 934, in patch\n    result = download_subtitle(moviePath, language, audio_language, hi, forced, providers_list,\n  File "/app/bazarr/get_subtitle.py", line 181, in download_subtitle\n    downloaded_subtitles = download_best_subtitles({video}, language_set, int(min_score), hi,\n  File "/app/bazarr/../libs/subliminal_patch/core.py", line 820, in download_best_subtitles\n    subtitles = pool.download_best_subtitles(pool.list_subtitles(video, languages - video.subtitle_languages),\n  File "/app/bazarr/../libs/subliminal_patch/core.py", line 462, in list_subtitles\n    for provider, provider_subtitles in executor.map(self.list_subtitles_provider, self.providers,\n  File "/usr/lib/python3.8/concurrent/futures/_base.py", line 611, in result_iterator\n    yield fs.pop().result()\n  File "/usr/lib/python3.8/concurrent/futures/_base.py", line 432, in result\n    return self.__get_result()\n  File "/usr/lib/python3.8/concurrent/futures/_base.py", line 388, in __get_result\n    raise self._exception\n  File "/usr/lib/python3.8/concurrent/futures/thread.py", line 57, in run\n    result = self.fn(*self.args, **self.kwargs)\n  File "/app/bazarr/../libs/subliminal_patch/core.py", line 448, in list_subtitles_provider\n    provider_subtitles = super(SZAsyncProviderPool, self).list_subtitles_provider(provider, video, languages)\n  File "/app/bazarr/../libs/subliminal_patch/core.py", line 148, in list_subtitles_provider\n    if not provider_registry[provider].check(video):\nAttributeError: \'NoneType\' object has no attribute \'check\''|
29/03/2021 18:44:04|ERROR   |app                             |Exception on /api/movies/subtitles [PATCH]|'Traceback (most recent call last):\n  File "/app/bazarr/../libs/flask/app.py", line 1949, in full_dispatch_request\n    rv = self.dispatch_request()\n  File "/app/bazarr/../libs/flask/app.py", line 1935, in dispatch_request\n    return self.view_functions[rule.endpoint](**req.view_args)\n  File "/app/bazarr/../libs/flask_restful/__init__.py", line 458, in wrapper\n    resp = resource(*args, **kwargs)\n  File "/app/bazarr/../libs/flask/views.py", line 89, in view\n    return self.dispatch_request(*args, **kwargs)\n  File "/app/bazarr/../libs/flask_restful/__init__.py", line 573, in dispatch_request\n    resp = meth(*args, **kwargs)\n  File "/app/bazarr/api.py", line 84, in wrapper\n    return actual_method(*args, **kwargs)\n  File "/app/bazarr/api.py", line 934, in patch\n    result = download_subtitle(moviePath, language, audio_language, hi, forced, providers_list,\n  File "/app/bazarr/get_subtitle.py", line 181, in download_subtitle\n    downloaded_subtitles = download_best_subtitles({video}, language_set, int(min_score), hi,\n  File "/app/bazarr/../libs/subliminal_patch/core.py", line 820, in download_best_subtitles\n    subtitles = pool.download_best_subtitles(pool.list_subtitles(video, languages - video.subtitle_languages),\n  File "/app/bazarr/../libs/subliminal_patch/core.py", line 462, in list_subtitles\n    for provider, provider_subtitles in executor.map(self.list_subtitles_provider, self.providers,\n  File "/usr/lib/python3.8/concurrent/futures/_base.py", line 611, in result_iterator\n    yield fs.pop().result()\n  File "/usr/lib/python3.8/concurrent/futures/_base.py", line 432, in result\n    return self.__get_result()\n  File "/usr/lib/python3.8/concurrent/futures/_base.py", line 388, in __get_result\n    raise self._exception\n  File "/usr/lib/python3.8/concurrent/futures/thread.py", line 57, in run\n    result = self.fn(*self.args, **self.kwargs)\n  File "/app/bazarr/../libs/subliminal_patch/core.py", line 448, in list_subtitles_provider\n    provider_subtitles = super(SZAsyncProviderPool, self).list_subtitles_provider(provider, video, languages)\n  File "/app/bazarr/../libs/subliminal_patch/core.py", line 148, in list_subtitles_provider\n    if not provider_registry[provider].check(video):\nAttributeError: \'NoneType\' object has no attribute \'check\''|
29/03/2021 18:44:06|ERROR   |apscheduler.executors.default   |Job "Search for wanted Series Subtitles (trigger: interval[3:00:00], next run at: 2021-03-29 21:44:03 PDT)" raised an exception|'Traceback (most recent call last):\n  File "/app/bazarr/../libs/apscheduler/executors/base.py", line 125, in run_job\n    retval = job.func(*job.args, **job.kwargs)\n  File "/app/bazarr/get_subtitle.py", line 1071, in wanted_search_missing_subtitles_series\n    wanted_download_subtitles(episode[\'path\'], i, count_episodes)\n  File "/app/bazarr/get_subtitle.py", line 957, in wanted_download_subtitles\n    result = download_subtitle(path_mappings.path_replace(episode[\'path\']),\n  File "/app/bazarr/get_subtitle.py", line 181, in download_subtitle\n    downloaded_subtitles = download_best_subtitles({video}, language_set, int(min_score), hi,\n  File "/app/bazarr/../libs/subliminal_patch/core.py", line 820, in download_best_subtitles\n    subtitles = pool.download_best_subtitles(pool.list_subtitles(video, languages - video.subtitle_languages),\n  File "/app/bazarr/../libs/subliminal_patch/core.py", line 462, in list_subtitles\n    for provider, provider_subtitles in executor.map(self.list_subtitles_provider, self.providers,\n  File "/usr/lib/python3.8/concurrent/futures/_base.py", line 611, in result_iterator\n    yield fs.pop().result()\n  File "/usr/lib/python3.8/concurrent/futures/_base.py", line 432, in result\n    return self.__get_result()\n  File "/usr/lib/python3.8/concurrent/futures/_base.py", line 388, in __get_result\n    raise self._exception\n  File "/usr/lib/python3.8/concurrent/futures/thread.py", line 57, in run\n    result = self.fn(*self.args, **self.kwargs)\n  File "/app/bazarr/../libs/subliminal_patch/core.py", line 448, in list_subtitles_provider\n    provider_subtitles = super(SZAsyncProviderPool, self).list_subtitles_provider(provider, video, languages)\n  File "/app/bazarr/../libs/subliminal_patch/core.py", line 148, in list_subtitles_provider\n    if not provider_registry[provider].check(video):\nAttributeError: \'NoneType\' object has no attribute \'check\''|
29/03/2021 18:44:11|ERROR   |app                             |Exception on /api/movies/subtitles [PATCH]|'Traceback (most recent call last):\n  File "/app/bazarr/../libs/flask/app.py", line 1949, in full_dispatch_request\n    rv = self.dispatch_request()\n  File "/app/bazarr/../libs/flask/app.py", line 1935, in dispatch_request\n    return self.view_functions[rule.endpoint](**req.view_args)\n  File "/app/bazarr/../libs/flask_restful/__init__.py", line 458, in wrapper\n    resp = resource(*args, **kwargs)\n  File "/app/bazarr/../libs/flask/views.py", line 89, in view\n    return self.dispatch_request(*args, **kwargs)\n  File "/app/bazarr/../libs/flask_restful/__init__.py", line 573, in dispatch_request\n    resp = meth(*args, **kwargs)\n  File "/app/bazarr/api.py", line 84, in wrapper\n    return actual_method(*args, **kwargs)\n  File "/app/bazarr/api.py", line 934, in patch\n    result = download_subtitle(moviePath, language, audio_language, hi, forced, providers_list,\n  File "/app/bazarr/get_subtitle.py", line 181, in download_subtitle\n    downloaded_subtitles = download_best_subtitles({video}, language_set, int(min_score), hi,\n  File "/app/bazarr/../libs/subliminal_patch/core.py", line 820, in download_best_subtitles\n    subtitles = pool.download_best_subtitles(pool.list_subtitles(video, languages - video.subtitle_languages),\n  File "/app/bazarr/../libs/subliminal_patch/core.py", line 462, in list_subtitles\n    for provider, provider_subtitles in executor.map(self.list_subtitles_provider, self.providers,\n  File "/usr/lib/python3.8/concurrent/futures/_base.py", line 611, in result_iterator\n    yield fs.pop().result()\n  File "/usr/lib/python3.8/concurrent/futures/_base.py", line 432, in result\n    return self.__get_result()\n  File "/usr/lib/python3.8/concurrent/futures/_base.py", line 388, in __get_result\n    raise self._exception\n  File "/usr/lib/python3.8/concurrent/futures/thread.py", line 57, in run\n    result = self.fn(*self.args, **self.kwargs)\n  File "/app/bazarr/../libs/subliminal_patch/core.py", line 448, in list_subtitles_provider\n    provider_subtitles = super(SZAsyncProviderPool, self).list_subtitles_provider(provider, video, languages)\n  File "/app/bazarr/../libs/subliminal_patch/core.py", line 148, in list_subtitles_provider\n    if not provider_registry[provider].check(video):\nAttributeError: \'NoneType\' object has no attribute \'check\''|
29/03/2021 18:50:06|ERROR   |app                             |Exception on /api/movies/subtitles [PATCH]|'Traceback (most recent call last):\n  File "/app/bazarr/../libs/flask/app.py", line 1949, in full_dispatch_request\n    rv = self.dispatch_request()\n  File "/app/bazarr/../libs/flask/app.py", line 1935, in dispatch_request\n    return self.view_functions[rule.endpoint](**req.view_args)\n  File "/app/bazarr/../libs/flask_restful/__init__.py", line 458, in wrapper\n    resp = resource(*args, **kwargs)\n  File "/app/bazarr/../libs/flask/views.py", line 89, in view\n    return self.dispatch_request(*args, **kwargs)\n  File "/app/bazarr/../libs/flask_restful/__init__.py", line 573, in dispatch_request\n    resp = meth(*args, **kwargs)\n  File "/app/bazarr/api.py", line 84, in wrapper\n    return actual_method(*args, **kwargs)\n  File "/app/bazarr/api.py", line 934, in patch\n    result = download_subtitle(moviePath, language, audio_language, hi, forced, providers_list,\n  File "/app/bazarr/get_subtitle.py", line 181, in download_subtitle\n    downloaded_subtitles = download_best_subtitles({video}, language_set, int(min_score), hi,\n  File "/app/bazarr/../libs/subliminal_patch/core.py", line 820, in download_best_subtitles\n    subtitles = pool.download_best_subtitles(pool.list_subtitles(video, languages - video.subtitle_languages),\n  File "/app/bazarr/../libs/subliminal_patch/core.py", line 225, in list_subtitles\n    provider_subtitles = self.list_subtitles_provider(name, video, languages)\n  File "/app/bazarr/../libs/subliminal_patch/core.py", line 148, in list_subtitles_provider\n    if not provider_registry[provider].check(video):\nAttributeError: \'NoneType\' object has no attribute \'check\''|

Also, here's a full debug log which shows it indeed finds the subtitle before giving an error.
full log.log

Software

  • Bazarr: [v 0.9.4-beta.10]
  • Radarr [v 3.0.2.4552]
  • Sonarr [v 3.0.6.1196]
  • OS: DSM/Linux (Synology NAS) running Docker

Additional context
I've spent 2+ hours trying to fix this bug by following all of the steps in the following issues: #1344, #303, #325
I deleted the db folder and restarted the docker container. My config.ini does contain the providers:
image.

Any help would be appreciated.

@morpheus65535
Copy link
Owner

@LASER-Yi any idea since you've reworked the enabled_providers settings?

@LASER-Yi
Copy link
Collaborator

@LASER-Yi any idea since you've reworked the enabled_providers settings?

No idea about this one, but it doesn't related to enabled_providers settings cause you got the following line in debug logs

Using 7 threads for 7 providers (['yify', 'bsplayer', 'subscenter', 'supersubtitles', 'tvsubtitles', 'opensubtitles', 'opensubtitlescom'])|

@morpheus65535
Copy link
Owner

@Prince25 just to be sure, can you try disabling bsplayer and see if it prevent the issue from happening?

@Prince25
Copy link
Author

Removed bsplayer and tried again, same error.

@morpheus65535
Copy link
Owner

Ok, as soon as I disable Yify, I'm not able to reproduce the error at all. Can you test on your side?

@morpheus65535
Copy link
Owner

Should be fixed in 0.9.4-beta.12. You will need to clear enabled_providers, restart Bazarr and select them again in Settings-->Providers.

@Prince25
Copy link
Author

Will I be able to install it using a docker container? I see that the images are still 0.9.4-beta.11.

@morpheus65535
Copy link
Owner

If will be released during the next 12 hours.

@Prince25
Copy link
Author

Yes, That fixed it. Thanks!

mvanbaak added a commit to mvanbaak/bazarr that referenced this issue Mar 31, 2021
…dled-dependencies

* upstream/development:
  Release 0.9.4-beta.12
  no log: Changed package_info file location
  no log: Fine-tuning fix for tvsubtitles provider
  Fixed tvsubtitles provider morpheus65535#1354
  no log: Remove Generate Package Info step
  no log: Add a step to generate package info
  Fixed some providers key to match the actual providers name in subliminal_patch morpheus65535#1353
  Updated the init process to get the branch from package_info in docker images
  no log: Add a step to build standalone version in action and upload to asset
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants