better-discord-notifications icon indicating copy to clipboard operation
better-discord-notifications copied to clipboard

Radarr Script giving errors -

Open xxtensazenxx opened this issue 5 years ago • 29 comments

https://puu.sh/FtfSZ/4fd360a2f7.png

Sonarr script is working perfectly but run into errors with the radarr one. I'm ok at troubleshooting but This is beyond me here. Can provide more info if needed

xxtensazenxx avatar Apr 04 '20 22:04 xxtensazenxx

Are you running it in docker?

samwiseg0 avatar Apr 04 '20 22:04 samwiseg0

No docker; I've never used it before

xxtensazenxx avatar Apr 04 '20 22:04 xxtensazenxx

Did you set all the configuration perams? https://github.com/samwiseg0/better-discord-notifications/blob/master/script_config.example.py

Step 3

samwiseg0 avatar Apr 04 '20 22:04 samwiseg0

Yup; everything is configured, I double checked

put my radarr API key under radarr_key=, made a movieDB api and put that key under moviedb_key =, and a IMDBAPI key too.

I think the errors may be python related?

xxtensazenxx avatar Apr 04 '20 22:04 xxtensazenxx

Maybe. cd to the folder and just run the script example: python3 ./radarr-discord.py

Paste the output.

samwiseg0 avatar Apr 04 '20 22:04 samwiseg0

Traceback (most recent call last): File "./radarr_discord.py", line 84, in radarr_data = radarr.json() File "/home/matt/.local/lib/python3.6/site-packages/requests/models.py", line 898, in json return complexjson.loads(self.text, **kwargs) File "/usr/lib/python3.6/json/init.py", line 354, in loads return _default_decoder.decode(s) File "/usr/lib/python3.6/json/decoder.py", line 339, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python3.6/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)

xxtensazenxx avatar Apr 04 '20 22:04 xxtensazenxx

Your radarr URL is wrong or it cannot get to the API. Which is /api. Make sure you do not have basic auth enabled for /api. It is best to use localhost and the port and not through any reverse proxy.

samwiseg0 avatar Apr 04 '20 22:04 samwiseg0

Ah my bad! updated the urls using localhost; new output when I run the radarr script

Traceback (most recent call last): File "./radarr_discord.py", line 87, in year = radarr_data['year'] KeyError: 'year'

and sonarr.py output is this Traceback (most recent call last): File "sonarr_discord.py", line 182, in main() File "sonarr_discord.py", line 58, in main title_slug = skyhook_data['slug'] KeyError: 'slug'

xxtensazenxx avatar Apr 04 '20 22:04 xxtensazenxx

Radarr error is "normal" test it from the UI now. Same with sonarr? Try that one from the UI as well.

samwiseg0 avatar Apr 04 '20 22:04 samwiseg0

Ok, sonarrr is working now; Radarr is doing nothing now, No output in Radarr logs or radarr_notification.log

xxtensazenxx avatar Apr 04 '20 22:04 xxtensazenxx

try running radarr_eventtype='test' bash -c 'python3 radarr_discord.py' from the commandline. That would simulate the same thing as radarr running the test itself.

samwiseg0 avatar Apr 04 '20 22:04 samwiseg0

Output

Traceback (most recent call last): File "radarr_discord.py", line 133, in quality_profile = get_profile_name(radarr_data['qualityProfileId']) KeyError: 'qualityProfileId'

xxtensazenxx avatar Apr 04 '20 22:04 xxtensazenxx

Are you running v3?

samwiseg0 avatar Apr 04 '20 23:04 samwiseg0

Radarr I'm running 0.2.0.1480, which is up to date I believe?

also here's the output when I tried again https://i.imgur.com/bwn4Qpz.png (On radarr)

xxtensazenxx avatar Apr 04 '20 23:04 xxtensazenxx

That is v2. The script works for Aphrodite. I don't think it will work with that version. I never tested it with the older version. https://hub.docker.com/r/hotio/radarr hotio/radarr:aphrodite

samwiseg0 avatar Apr 04 '20 23:04 samwiseg0

You can pull the script before it was updated for v3. https://github.com/samwiseg0/better-discord-notifications/tree/787db54ae9ac9b8b43a8d2d01c788c8342f0bc49

samwiseg0 avatar Apr 04 '20 23:04 samwiseg0

It seems V3 is still very nightly, so I'm hesitant to upgrade to it before its on github, also I have no idea how to use docker.

I re-did everything with the script you linked but the final error I get for radarr is

radarr_discord.py Traceback (most recent call last): 8:11pm radarr_discord.py File "/home/(removed)/scripts/discordnotify/radarr_discord.py", line 66, in 8:11pm radarr_discord.py year = radarr_data['year'] 8:11pm radarr_discord.py KeyError: 'year'

when I just run the script with your command radarr_eventtype='test' bash -c 'python3 radarr_discord.py'

It just posts the lego movie in the discord.

xxtensazenxx avatar Apr 05 '20 00:04 xxtensazenxx

If it posts the lego movie then it worked. If there was an error it would not have posted at all. It should work now.

samwiseg0 avatar Apr 05 '20 00:04 samwiseg0

Weird, I keep trying it It says the KeyError 'Year' in the radarr logs :O

xxtensazenxx avatar Apr 05 '20 00:04 xxtensazenxx

have you tried just downloading a movie and see if it works?

samwiseg0 avatar Apr 05 '20 00:04 samwiseg0

Yup, that's how i've been testing it. I just downloaded a few movies and each time it finishes it gives me the previous error with the "KeyError: 'year'" errors

xxtensazenxx avatar Apr 05 '20 00:04 xxtensazenxx

But does it post to discord successfully?

samwiseg0 avatar Apr 05 '20 00:04 samwiseg0

Nope, it does not post to the discord

xxtensazenxx avatar Apr 05 '20 01:04 xxtensazenxx

What does http://URL:PORT/api/movie/10?apikey=APIKEYreturn?

samwiseg0 avatar Apr 05 '20 01:04 samwiseg0

{ "message": "NotFound" }

should I maybe reset API key?

xxtensazenxx avatar Apr 05 '20 01:04 xxtensazenxx

This is not making sense.

  1. When testing the script does it post to discord?
  2. When downloading something and having the script run it errors with KeyError: 'year'"? If that is the case something is still wrong with your radarr URL/API key in the config.

When doing the test it ignores anything coming from the radarr API and that is why it would succeed.

Make sure you are setting it exactly as the example shows in the config:

radarr_url = 'http://movies.domain.ltd/' # Make sure you include the trailing /
radarr_key = 'XXXXXXXXXXXXXXXX'

You do not need to reset the API key. You would get a different error.

samwiseg0 avatar Apr 05 '20 17:04 samwiseg0

@xxtensazenxx Did you get this figured out?

samwiseg0 avatar Apr 07 '20 15:04 samwiseg0

Nope, not yet. I checked and its configured as you described... maybe I'll just upgrade to v3. Is there any way to download it besides the docker:?>

xxtensazenxx avatar Apr 08 '20 04:04 xxtensazenxx

They only have docker images for v3 unless you build it yourself.

samwiseg0 avatar Apr 08 '20 14:04 samwiseg0