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

TypeError: byte indices must be integers or slices, not str #68

Open
darkknight7777777 opened this issue Jun 24, 2022 · 1 comment
Open
Labels
bug Something isn't working

Comments

@darkknight7777777
Copy link

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:

  1. 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
  2. The name of the movie or serie that is being processed at the time of the error (if applicable) n/a
  3. 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

  1. OS Version: ... ubuntu 20
  2. Excludarr version: ... v1.0.7
  3. 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 #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

@darkknight7777777 darkknight7777777 added the bug Something isn't working label Jun 24, 2022
@havekes
Copy link

havekes commented Jul 8, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants