haijeploeg / excludarr

Excludarr manages your libraries in Radarr/Sonarr. It keeps track of your library and checks if your movies and series are also available on a configured streaming provider. It can exclude the movies and series that are available on a configured streaming provider. But it can also re-add movies and series if they are not streaming anymore.
MIT License
194 stars 13 forks source link

Error invalid literal for int() #44

Closed Tailslide closed 2 years ago

Tailslide commented 2 years ago

Running from docker container haijeploeg/excludarr:latest

Traceback (most recent call last): File "/usr/local/bin/excludarr", line 33, in sys.exit(load_entry_point('excludarr==1.0.4', 'console_scripts', 'excludarr')()) File "/usr/local/lib/python3.10/site-packages/excludarr-1.0.4-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.4-py3.10.egg/excludarr/commands/radarr.py", line 86, in exclude File "/usr/local/lib/python3.10/site-packages/excludarr-1.0.4-py3.10.egg/excludarr/core/radarr_actions.py", line 112, in get_movies_to_exclude File "/usr/local/lib/python3.10/site-packages/excludarr-1.0.4-py3.10.egg/excludarr/core/radarr_actions.py", line 71, in _find_movie File "/usr/local/lib/python3.10/site-packages/excludarr-1.0.4-py3.10.egg/excludarr/core/radarr_actions.py", line 30, in _get_jw_movie_data File "/usr/local/lib/python3.10/site-packages/excludarr-1.0.4-py3.10.egg/excludarr/utils/filters.py", line 18, in get_tmdb_ids File "/usr/local/lib/python3.10/site-packages/excludarr-1.0.4-py3.10.egg/excludarr/utils/filters.py", line 19, in ValueError: invalid literal for int() with base 10: 'tt11388406'

haijeploeg commented 2 years ago

Hi, thanks for your issue. To reproduce this I need more information, could you please edit your issue and add back the bug report template? Filling in the template will help me understand the issue and help with with reproducing the issue in order to fix it. The template is as follows:

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. The exact command that throws an error
  2. The name of the movie or serie that is being processed at the time of the error (if applicable)
  3. The settings file used (strip it from sensitive data)

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

Versions

  1. OS Version: ...
  2. Excludarr version: ...
  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 Add any other context about the problem here.

Tailslide commented 2 years ago

Like I said, I'm using your latest docker image so whatever excludarr version and python version you are using in that. Here is the command I'm running: sudo docker run --rm --env-file excludarr.env haijeploeg/excludarr:latest --debug radarr exclude -a delete -y -e

excludarr.env:

GENERAL_FAST_SEARCH=true
GENERAL_LOCALE=en_NL
GENERAL_PROVIDERS=netflix, amazon prime video
RADARR_URL=http://myurl:7878
RADARR_API_KEY=mykey
RADARR_VERIFY_SSL=false

Here is the relevant portion of the debug log. You might want to change this line to have a sanity check that the value is actually an integer so the script can log an error and continue: int(x["external_id"])

Logs

[2022-01-11 00:35:59] - Querying JustWatch API with ID: 137875 for title: By the Sea
[2022-01-11 00:35:59] - Got TMDB ID's: [310131] from JustWatch API
[2022-01-11 00:35:59] - Querying JustWatch API with ID: 147991 for title: By the Sea
[2022-01-11 00:35:59] - Got TMDB ID's: [298312, 343058] from JustWatch API
[2022-01-11 00:35:59] - Processing title: Horse Girl with Radarr ID: 8344 and TMDB ID: 653601
[2022-01-11 00:35:59] - Query JustWatch API with title: Horse Girl
[2022-01-11 00:36:01] - Querying JustWatch API with ID: 845512 for title: Horse Girl

Traceback (most recent call last):
  File "/usr/local/bin/excludarr", line 33, in <module>
    sys.exit(load_entry_point('excludarr==1.0.4', 'console_scripts', 'excludarr')())
  File "/usr/local/lib/python3.10/site-packages/excludarr-1.0.4-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.4-py3.10.egg/excludarr/commands/radarr.py", line 86, in exclude
  File "/usr/local/lib/python3.10/site-packages/excludarr-1.0.4-py3.10.egg/excludarr/core/radarr_actions.py", line 112, in get_movies_to_exclude
  File "/usr/local/lib/python3.10/site-packages/excludarr-1.0.4-py3.10.egg/excludarr/core/radarr_actions.py", line 71, in _find_movie
  File "/usr/local/lib/python3.10/site-packages/excludarr-1.0.4-py3.10.egg/excludarr/core/radarr_actions.py", line 30, in _get_jw_movie_data
  File "/usr/local/lib/python3.10/site-packages/excludarr-1.0.4-py3.10.egg/excludarr/utils/filters.py", line 18, in get_tmdb_ids
  File "/usr/local/lib/python3.10/site-packages/excludarr-1.0.4-py3.10.egg/excludarr/utils/filters.py", line 19, in <listcomp>
ValueError: invalid literal for int() with base 10: 'tt11388406'