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

Radarr returned status code 200 #10

Open
karan opened this issue Jun 16, 2021 · 5 comments
Open

Radarr returned status code 200 #10

karan opened this issue Jun 16, 2021 · 5 comments

Comments

@karan
Copy link

karan commented Jun 16, 2021

Radarr can return status code 200 however this has 2 problems:

  1. The movie is still not marked unmonitored.

  2. The error condition raises an error because r.json() is a list of all movies.

    Traceback (most recent call last):
      File "radarr_sonarr_watchmon.py", line 423, in <module>
        app.radarr(recent_days, radarr_address, radarr_apikey)
      File "radarr_sonarr_watchmon.py", line 130, in radarr
        print("   Error: "+str(r.json()["message"]))
    TypeError: list indices must be integers or slices, not str
    

Radarr Version: 3.2.2.5080

@Herjar
Copy link
Owner

Herjar commented Jun 29, 2021

I have not seen that on my end, but 200 is not an error so I made a small update to avoid printing the error message: 0075628

200 is a successful request though, so not sure why it is not unmonitored. Do you have some steps to reproduce it?

@karan
Copy link
Author

karan commented Jun 29, 2021

Okay now the script does not error but the movie is also not marked unmonitored. Here's radarr's trace logs (a single movie was supposed to be changed to unmonitored):

2021-06-29 16:51:17.9|Trace|Http|Req: 235 [GET] /api/v3/movie?apikey=(removed) (from ::ffff:$IP_REMOVED python-requests/2.22.0)
2021-06-29 16:51:17.9|Trace|Http|Res: 235 [GET] /api/v3/movie?apikey=(removed) 303.SeeOther (2 ms)
2021-06-29 16:51:17.9|Debug|Api|[GET] /api/v3/movie?apikey=(removed) 303.SeeOther (2 ms)
2021-06-29 16:51:17.9|Trace|Http|Req: 236 [GET] /api/v3/movie?apikey=(removed) (from ::ffff:$IP_REMOVED python-requests/2.22.0)
2021-06-29 16:51:17.9|Trace|ConfigService|Using default config value for 'movieinfolanguage' defaultValue:'1'
2021-06-29 16:51:17.9|Trace|ConfigService|Using default config value for 'availabilitydelay' defaultValue:'0'
2021-06-29 16:51:18.0|Trace|Http|Res: 236 [GET] /api/v3/movie?apikey=(removed) 200.OK (154 ms)
2021-06-29 16:51:18.0|Debug|Api|[GET] /api/v3/movie?apikey=(removed) 200.OK (154 ms)
2021-06-29 16:51:18.3|Trace|Http|Req: 237 [PUT] /api/v3/movie?apikey=(removed) (from ::ffff:$IP_REMOVED python-requests/2.22.0)
2021-06-29 16:51:18.3|Trace|Http|Res: 237 [PUT] /api/v3/movie?apikey=(removed) 303.SeeOther (0 ms)
2021-06-29 16:51:18.3|Debug|Api|[PUT] /api/v3/movie?apikey=(removed) 303.SeeOther (0 ms)
2021-06-29 16:51:18.3|Trace|Http|Req: 238 [GET] /api/v3/movie?apikey=(removed) (from ::ffff:$IP_REMOVED python-requests/2.22.0)
2021-06-29 16:51:18.3|Trace|ConfigService|Using default config value for 'movieinfolanguage' defaultValue:'1'
2021-06-29 16:51:18.3|Trace|ConfigService|Using default config value for 'availabilitydelay' defaultValue:'0'
2021-06-29 16:51:18.4|Trace|Http|Res: 238 [GET] /api/v3/movie?apikey=(removed) 200.OK (159 ms)
2021-06-29 16:51:18.4|Debug|Api|[GET] /api/v3/movie?apikey=(removed) 200.OK (159 ms)
2021-06-29 16:51:20.0|Trace|Http|Req: 239 [GET] /logfile/radarr.trace.txt (from ::ffff:172.21.0.2 Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36)

I'll see what else I can find.

@karan
Copy link
Author

karan commented Jun 30, 2021

So no luck. If I get the movie right after it updates it, I still see it's monitored.

It's not an auth issue since according to the logs the PUT response is a 303 (what? why not 200? the python script sees a 200 infact). Not sure if it's relevant but the response of the PUT request (r.json()) is a list of all the movies. Is that expected or should it only be the movie that was updated?

@X-Light
Copy link

X-Light commented Oct 30, 2023

Today I faced the same issue and found out that the reason for this is my URL Base. So you have to edit the python script and add it in front of /api/v3, for example -> /radarr/api/v3

@gitthangbaby
Copy link

My reason was duplicit movie title in Radarr. I've deleted one, and the movie stayed correctly and this error is gone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants