vladimir-tutin / Plex-Auto-Collections

Python 3 script to automatically update Plex collections based off a configuration file
123 stars 59 forks source link

Failed to add movies to radarr #19

Open ShadowFM opened 4 years ago

ShadowFM commented 4 years ago

Is there something I could do?

Add missing movies to Radarr? (y/n): y
INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): api.themoviedb.org
INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): radarr.xyz
Traceback (most recent call last):
  File "plex_auto_collections.py", line 163, in <module>
    update_from_config(plex)
  File "/home/Plex-Auto-Collections/config_tools.py", line 99, in update_from_config
    add_to_radarr(missing)
  File "/home/Plex-Auto-Collections/radarr_tools.py", line 62, in add_to_radarr
    r_json = json.loads(response.text)
  File "/usr/lib/python3.5/json/__init__.py", line 319, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.5/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.5/json/decoder.py", line 357, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
burkasaurusrex commented 4 years ago

It's hard to know what's going on without the full context unfortunately. It looks like there might be a problem with the radarr block in the config?

The url parameter in the [radarr] block should be the exact URL to connect radarr. For example if you have /some-url-base set in radarr's applications settings (General > Start-Up > URL Base), you would need to include something like http://192.168.1.1:7878/some-url-base in the config.

It's worth noting that you should not include a trailing slash on the URL either.

Finally, I'd recommend checking out this fork instead: mza921/Plex-Auto-Collections. The compiled versions in /dist aren't updated, but the fork has a lot of improvements including better radarr support.