excludarr
excludarr copied to clipboard
TypeError: byte indices must be integers or slices, not str
Describe the bug When trying to run excludarr in docker I get the error listed below from debug.
To Reproduce Steps to reproduce the behavior:
- The exact command that throws an error: docker run -it --rm --env-file excludarr.env haijeploeg/excludarr:latest --debug radarr exclude -a delete -d -e --progress
- The name of the movie or serie that is being processed at the time of the error (if applicable) n/a
- The settings file used (strip it from sensitive data)
GENERAL_FAST_SEARCH=true GENERAL_LOCALE=en_US GENERAL_PROVIDERS=amazon prime video RADARR_URL=http://192.168.0.253:7878/ RADARR_API_KEY=secret RADARR_VERIFY_SSL=false RADARR_EXCLUDE=Blade SONARR_URL=http://sonarr.example.com:8989 SONARR_API_KEY=secret SONARR_VERIFY_SSL=false SONARR_EXCLUDE="Queen of the South, Breaking Bad"
Expected behavior no error
Versions
- OS Version: ... ubuntu 20
- Excludarr version: ... v1.0.7
- Python version: ...
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
.
If the output is too long, please paste the output to pastebin or github gist and link it in this issue.
Additional context error looks similar to https://github.com/haijeploeg/excludarr/issues/5, but it states the fix is to use the internal URL, which I'm already doing.
I've tried different locales, different providers, tried removing the RADARR_EXCLUDE variable all together
error output from command
root@dockertest:/home# docker run -it --rm --env-file excludarr.env haijeploeg/excludarr:latest --debug radarr exclude -a delete -d -e --progress
[2022-06-24 22:06:54] - Starting Excludarr v1.0.7
[2022-06-24 22:06:54] - Got radarr as subcommand
[2022-06-24 22:06:54] - Reading configuration file
[2022-06-24 22:06:54] - Determining which configfile to use
[2022-06-24 22:06:54] - Configfile to use: /etc/excludarr/excludarr.yml
[2022-06-24 22:06:54] - Reading configfile: /etc/excludarr/excludarr.yml
[2022-06-24 22:06:54] - Read the following configuration: {'general': {'fast_search': True, 'locale': 'en_US', 'providers': ['amazon prime video']}, 'radarr': {'url': 'http://192.168.0.253:7878/', 'api_key': '<REDACTED>', 'verify_ssl': False, 'exclude': ['Blade']}, 'sonarr': {'url': 'http://sonarr.example.com:8989', 'api_key': '<REDACTED>', 'verify_ssl': False, 'exclude': ['Queen of the South, Breaking Bad']}}
[2022-06-24 22:06:54] - Got exclude as subcommand
[2022-06-24 22:06:54] - Got CLI values for -p, --provider option:
[2022-06-24 22:06:54] - Got CLI values for -l, --locale option: None
[2022-06-24 22:06:54] - Got CLI values for -a, --action option: delete
[2022-06-24 22:06:54] - Got CLI values for -d, --delete option: True
[2022-06-24 22:06:54] - Got CLI values for -e, --exclusion option: True
[2022-06-24 22:06:54] - Got CLI values for -y, --yes option: False
[2022-06-24 22:06:54] - Got CLI values for --progress option: True
[2022-06-24 22:06:54] - Initializing PyRadarr
[2022-06-24 22:06:54] - Initializing JustWatch API with locale: en_US
[2022-06-24 22:06:54] - Getting all the movies from Radarr
[2022-06-24 22:06:54] - Got the following providers: Amazon Prime Video
Traceback (most recent call last):
File "/usr/local/bin/excludarr", line 33, in <module>
sys.exit(load_entry_point('excludarr==1.0.7', 'console_scripts', 'excludarr')())
File "/usr/local/lib/python3.10/site-packages/excludarr-1.0.7-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 1130, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 760, 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.7-py3.10.egg/excludarr/commands/radarr.py", line 84, in exclude
File "/usr/local/lib/python3.10/site-packages/excludarr-1.0.7-py3.10.egg/excludarr/core/radarr_actions.py", line 98, in get_movies_to_exclude
TypeError: byte indices must be integers or slices, not str
I have the same issue, it seems to come from the parsing of the GENERAL_PROVIDERS variable. The issue is not present in v1.0.6 so you can just use it as you docker image in the meantime. I could have go at trying to solve this issue over the weekend.