Sperryfreak01 / RadarrSync

120 stars 47 forks source link

Radarr server error - response 401 #42

Open nathank1989 opened 4 years ago

nathank1989 commented 4 years ago

Describe the bug A clear and concise description of what the bug is. Try to run the script and get this error 2020-05-23 22:23:38,167 [MainThread ] [ERROR] Radarr server error - response 401

To Reproduce root@PEXTP02:~/RadarrSync# python RadarrSync.py 2020-05-23 22:23:38,167 [MainThread ] [ERROR] Radarr server error - response 401

Expected behavior The script to work

Configuration `[Radarr] url = http://localhost:7878 key = 7cxxxxxxxxxxxx0a

[Radarr4k] url = http://4kdarr:7878 key = 96xxxxxxxxxxxxxx8a9 profile = 5

`

Logs root@PEXTP02:~/RadarrSync# cat Output.txt 2020-05-23 22:20:36,940 [MainThread ] [ERROR] Radarr server error - response 401 2020-05-23 22:22:45,464 [MainThread ] [ERROR] Radarr server error - response 401 2020-05-23 22:23:38,167 [MainThread ] [ERROR] Radarr server error - response 401

blade316 commented 4 years ago

@nathank1989 I had this when my 4K Radarr didn't have the corresponding profile created that had the corresponding number - e.g. the profile in my normal Radarr was ID 7 ... but in Radarr 4K I didn't have one with ID 7, so had to create it

rj-d2 commented 4 years ago

did you get this to work? i have the same problem, i try running beta version 1.2.1

$ python3 RadarrSync.py

2020-06-30 00:10:18,970 [MainThread ] [ERROR] Radarr server error - response 401

DevConfig.txt [Radarr] url = https://***.server.com/radarr key = api profile = 1080p

[Radarr4k] url = https://***.server.com/radarr4k key = api destination_profile = Ultra-HD

blade316 commented 4 years ago

@scr44tch so the issue was that radarrsync uses the ID number of the profile rather than the name ... it’s a silly way to do it, but it is what it is .... so my issue was that my normal radarr profile IDs and my corresponding radarr4k profile IDs did not like up .... this is because when you delete and flee create profiles, it does not give them the next available number eg if you had 5 profiles to begin with, you would have IDs 1,2,3,4,5 - if you delete say 1080p profile which might be profile ID 3, then recreate it, it doesn’t get 3 again, it gets a new number, which is the next available number except for the original ID number - eg 6

I only found this out because I got so fed up with it I just opened up the .db files from each radarr instance and looked at the IDs, once I saw what was happening I understood how it works ... so in my case my 1080p only profile matched the ID number of put as my radarr4K ID to use ... so it was sending all my 1080p Only movies to radarr4K .... so I just removed all my movies from my radarr 4K and edited the db file and made the ID number match my 1080p & 4K profile ID number in my main radarr instance and it’s fine now.

Alternatively you could start a completely fresh install of radarr and radarr4k and the default profile ID numbers will match - but I have a lot of custom profile entries I use so this was easier.

If radarraync just used the profile name rather than the profile ID, it would be way easier.

rj-d2 commented 4 years ago

thx, i didnt knew how to get the right profile id, but version 1.2.1 beta should have fixed this right? profile = Ultra-HD should work as far as i uderstand

https://github.com/Sperryfreak01/RadarrSync/releases/tag/1.2.1 https://www.reddit.com/r/radarr/comments/9ek2lp/radarrsync_v12_beta_release/

blade316 commented 4 years ago

thx, i didnt knew how to get the right profile id, but version 1.2.1 beta should have fixed this right? profile = Ultra-HD should work as far as i uderstand

https://github.com/Sperryfreak01/RadarrSync/releases/tag/1.2.1 https://www.reddit.com/r/radarr/comments/9ek2lp/radarrsync_v12_beta_release/

No idea - I’m not following the changes anymore, no need as I now understand how the code works, so easy to modify my profile IDs directly in the db if I ever need to again .... I just let radarrsync run quietly in the background now and it syncs every 15mins