question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Sonarr Scan fails

See original GitHub issue

Thought it was because of the pip install of excludarr, but went with the docker image to make sure it wasn’t a dependency issue.

When I run the job, I get the following error:

|> excludarr <| / #excludarr sonarr exclude -a not-monitored --progress Working… ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00 Traceback (most recent call last): File “/usr/local/bin/excludarr”, line 33, in <module> sys.exit(load_entry_point(‘excludarr==1.0.6’, ‘console_scripts’, ‘excludarr’)()) File “/usr/local/lib/python3.10/site-packages/excludarr-1.0.6-py3.10.egg/excludarr/main.py”, line 68, in cli File “/usr/local/lib/python3.10/site-packages/typer/main.py”, line 214, in call return get_command(self)(*args, **kwargs) File “/usr/local/lib/python3.10/site-packages/click/core.py”, line 1128, in call return self.main(*args, **kwargs) File “/usr/local/lib/python3.10/site-packages/click/core.py”, line 1053, in main rv = self.invoke(ctx) File “/usr/local/lib/python3.10/site-packages/click/core.py”, line 1659, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File “/usr/local/lib/python3.10/site-packages/click/core.py”, line 1659, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File “/usr/local/lib/python3.10/site-packages/click/core.py”, line 1395, in invoke return ctx.invoke(self.callback, **ctx.params) File “/usr/local/lib/python3.10/site-packages/click/core.py”, line 754, in invoke return __callback(*args, **kwargs) File “/usr/local/lib/python3.10/site-packages/typer/main.py”, line 500, in wrapper return callback(**use_params) # type: ignore File “/usr/local/lib/python3.10/site-packages/excludarr-1.0.6-py3.10.egg/excludarr/commands/sonarr.py”, line 69, in exclude File “/usr/local/lib/python3.10/site-packages/excludarr-1.0.6-py3.10.egg/excludarr/core/sonarr_actions.py”, line 281, in get_series_to_exclude KeyError: ‘statistics’ |> excludarr <| / #

To Reproduce Steps to reproduce the behavior:

  1. The exact command that throws an error excludarr sonarr exclude -a not-monitored --progress

  2. The name of the movie or serie that is being processed at the time of the error (if applicable) initial scan, so unknown.

  3. The settings file used (strip it from sensitive data)

image

Expected behavior A clear and concise description of what you expected to happen.

I expect it to complete the scan and present a menus

Debug logging To debug the problem further, we need to know exactly what went wrong. Therefor we ask you to run the command in debug mode. You can achieve this by appending the --debug flag after the base command excludarr. e.g. excludarr --debug sonarr exclude -a delete -d -e.

|> excludarr <| / #excludarr --debug sonarr exclude -a not-monitored --progress [2022-01-25 18:59:13] - Starting Excludarr v1.0.6 [2022-01-25 18:59:13] - Got sonarr as subcommand [2022-01-25 18:59:13] - Reading configuration file [2022-01-25 18:59:13] - Determining which configfile to use [2022-01-25 18:59:13] - Configfile to use: /etc/excludarr/excludarr.yml [2022-01-25 18:59:13] - Reading configfile: /etc/excludarr/excludarr.yml [2022-01-25 18:59:13] - Read the following configuration: {‘general’: {‘fast_search’: True, ‘locale’: ‘en_US’, ‘providers’: [‘netflix’, ‘amazon prime video’]}, ‘radarr’: {‘url’: ‘http://radarr:7878’, ‘api_key’: ‘<REDACTED>’, ‘verify_ssl’: False, ‘exclude’: [‘’]}, ‘sonarr’: {‘url’: ‘http://sonarr:8989’, ‘api_key’: ‘<REDACTED>’, ‘verify_ssl’: False, ‘exclude’: [‘’]}} [2022-01-25 18:59:13] - Got exclude as subcommand [2022-01-25 18:59:13] - Got CLI values for -p, --provider option: [2022-01-25 18:59:13] - Got CLI values for -l, --locale option: None [2022-01-25 18:59:13] - Got CLI values for -a, --action option: not-monitored [2022-01-25 18:59:13] - Got CLI values for -d, --delete option: False [2022-01-25 18:59:13] - Got CLI values for -e, --exclusion option: False [2022-01-25 18:59:13] - Got CLI values for -y, --yes option: False [2022-01-25 18:59:13] - Got CLI values for --progress option: True [2022-01-25 18:59:13] - Initializing PySonarr [2022-01-25 18:59:13] - Initializing JustWatch API with locale: en_US [2022-01-25 18:59:16] - Getting all the series from Sonarr [2022-01-25 18:59:34] - Got the following providers: Netflix, Amazon Prime Video

<lots of show data>

Traceback (most recent call last): File “/usr/local/bin/excludarr”, line 33, in <module> sys.exit(load_entry_point(‘excludarr==1.0.6’, ‘console_scripts’, ‘excludarr’)()) File “/usr/local/lib/python3.10/site-packages/excludarr-1.0.6-py3.10.egg/excludarr/main.py”, line 68, in cli File “/usr/local/lib/python3.10/site-packages/typer/main.py”, line 214, in call return get_command(self)(*args, **kwargs) File “/usr/local/lib/python3.10/site-packages/click/core.py”, line 1128, in call return self.main(*args, **kwargs) File “/usr/local/lib/python3.10/site-packages/click/core.py”, line 1053, in main rv = self.invoke(ctx) File “/usr/local/lib/python3.10/site-packages/click/core.py”, line 1659, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File “/usr/local/lib/python3.10/site-packages/click/core.py”, line 1659, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File “/usr/local/lib/python3.10/site-packages/click/core.py”, line 1395, in invoke return ctx.invoke(self.callback, **ctx.params) File “/usr/local/lib/python3.10/site-packages/click/core.py”, line 754, in invoke return __callback(*args, **kwargs) File “/usr/local/lib/python3.10/site-packages/typer/main.py”, line 500, in wrapper return callback(**use_params) # type: ignore File “/usr/local/lib/python3.10/site-packages/excludarr-1.0.6-py3.10.egg/excludarr/commands/sonarr.py”, line 69, in exclude File “/usr/local/lib/python3.10/site-packages/excludarr-1.0.6-py3.10.egg/excludarr/core/sonarr_actions.py”, line 281, in get_series_to_exclude KeyError: ‘statistics’

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
haijeploegcommented, Feb 8, 2022

Great! Fine that it worked out. It seems that Excludarr crashed because Sonarr was not responding properly on getting the information about an episode. This was probably caused by overloading Sonarr with API calls. You said you had a few hundred shows in your library? Maybe that was causing issues with requesting all those information in such short time.

I will try to add a delay between the retries it does when encountering an error requested via the API of Sonarr. This will give Sonarr the time to breathe for a while without causing issues in Excludarr.

0reactions
haijeploegcommented, Feb 13, 2022

Great to hear it all worked out! I will increase the retry delay in the next version!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Refresh and scan falied - Help & Support - sonarr :: forums
Sonarr is not refreshing and scanning anymore. And it's not fetching for updates either. Whenever I scan it's says “scan failed”.
Read more >
Refresh and scan won't scan for existing files if refresh errors
If a series is removed from tvdb, clicking Refresh & Scan button on the series page in Sonarr will result in:
Read more >
Error in log when scanning serie · Issue #3969 - GitHub
Describe the bug When scanning comes by, I see an error in the logging. ... Sonarr Version: 3.0.3.928; Operating System: Synology DSM 6.2 ......
Read more >
The Ultimate Guide to Sonarr. - RapidSeedbox
Sonarr automatically retries failed episodes (different versions), ... You can point it to scan for episode data in specific indexers ...
Read more >
The common Sonarr and SABnzbd problem - Forums - Unraid
SAB is downloading files properly, but sonarr is not moving or ... with sonarr v2, so I didn't consider that till i scanned...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found