Feramance / qBitrr

A simple Python script to talk to qBittorrent and Arr's
MIT License
61 stars 2 forks source link

Key error #58

Closed pokemonfirer closed 5 months ago

pokemonfirer commented 5 months ago

im getting a log spam of this

2024-02-04T07:19:16.169473442Z [2024-02-04 07:19:16] [pid:       7][tid:140515862895488] WARNING : qBitrr.Sonarr-TV   : Key Error [95155]
2024-02-04T07:19:16.225494316Z [2024-02-04 07:19:16] [pid:       7][tid:140515862895488] WARNING : qBitrr.Sonarr-TV   : Key Error [95155]
2024-02-04T07:19:16.277768003Z [2024-02-04 07:19:16] [pid:       7][tid:140515862895488] WARNING : qBitrr.Sonarr-TV   : Key Error [95155]
2024-02-04T07:19:16.325713869Z [2024-02-04 07:19:16] [pid:       7][tid:140515862895488] WARNING : qBitrr.Sonarr-TV   : Key Error [95155]
2024-02-04T07:19:16.373616094Z [2024-02-04 07:19:16] [pid:       7][tid:140515862895488] WARNING : qBitrr.Sonarr-TV   : Key Error [95155]
2024-02-04T07:19:16.421303434Z [2024-02-04 07:19:16] [pid:       7][tid:140515862895488] WARNING : qBitrr.Sonarr-TV   : Key Error [95155]
2024-02-04T07:19:16.473442577Z [2024-02-04 07:19:16] [pid:       7][tid:140515862895488] WARNING : qBitrr.Sonarr-TV   : Key Error [95155]
2024-02-04T07:19:16.525430117Z [2024-02-04 07:19:16] [pid:       7][tid:140515862895488] WARNING : qBitrr.Sonarr-TV   : Key Error [95155]
2024-02-04T07:19:16.577543900Z [2024-02-04 07:19:16] [pid:       7][tid:140515862895488] WARNING : qBitrr.Sonarr-TV   : Key Error [95155]
2024-02-04T07:19:16.629424308Z [2024-02-04 07:19:16] [pid:       7][tid:140515862895488] WARNING : qBitrr.Sonarr-TV   : Key Error [95155]
2024-02-04T07:19:16.677365304Z [2024-02-04 07:19:16] [pid:       7][tid:140515862895488] WARNING : qBitrr.Sonarr-TV   : Key Error [95155]
2024-02-04T07:19:16.729380235Z [2024-02-04 07:19:16] [pid:       7][tid:140515862895488] WARNING : qBitrr.Sonarr-TV   : Key Error [95155]
2024-02-04T07:19:16.777426603Z [2024-02-04 07:19:16] [pid:       7][tid:140515862895488] WARNING : qBitrr.Sonarr-TV   : Key Error [95155]
2024-02-04T07:19:16.785936481Z [2024-02-04 07:19:16] [pid:       7][tid:140515862895488] WARNING : qBitrr.Sonarr-TV   : Key Error [95155]
2024-02-04T07:19:16.837389449Z [2024-02-04 07:19:16] [pid:       7][tid:140515862895488] WARNING : qBitrr.Sonarr-TV   : Key Error [95155]
2024-02-04T07:19:16.885324744Z [2024-02-04 07:19:16] [pid:       7][tid:140515862895488] WARNING : qBitrr.Sonarr-TV   : Key Error [95155]
2024-02-04T07:19:16.941475981Z [2024-02-04 07:19:16] [pid:       7][tid:140515862895488] WARNING : qBitrr.Sonarr-TV   : Key Error [95155]
2024-02-04T07:19:16.989416287Z [2024-02-04 07:19:16] [pid:       7][tid:140515862895488] WARNING : qBitrr.Sonarr-TV   : Key Error [95155]
2024-02-04T07:19:17.041361266Z [2024-02-04 07:19:17] [pid:       7][tid:140515862895488] WARNING : qBitrr.Sonarr-TV   : Key Error [95155]
2024-02-04T07:19:17.093413528Z [2024-02-04 07:19:17] [pid:       7][tid:140515862895488] WARNING : qBitrr.Sonarr-TV   : Key Error [95155]
2024-02-04T07:19:17.145823098Z [2024-02-04 07:19:17] [pid:       7][tid:140515862895488] WARNING : qBitrr.Sonarr-TV   : Key Error [95155]
2024-02-04T07:19:17.193338584Z [2024-02-04 07:19:17] [pid:       7][tid:140515862895488] WARNING : qBitrr.Sonarr-TV   : Key Error [95155]
2024-02-04T07:19:17.241406312Z [2024-02-04 07:19:17] [pid:       7][tid:140515862895488] WARNING : qBitrr.Sonarr-TV   : Key Error [95155]
2024-02-04T07:19:17.289434240Z [2024-02-04 07:19:17] [pid:       7][tid:140515862895488] WARNING : qBitrr.Sonarr-TV   : Key Error [95155]
2024-02-04T07:19:17.341342768Z [2024-02-04 07:19:17] [pid:       7][tid:140515862895488] WARNING : qBitrr.Sonarr-TV   : Key Error [95155]

ive checked my api key at least 5 times and its correct config is as follows:

[Sonarr-TV]

# Toggle whether to manage the Servarr instance torrents.
Managed = true

# The URL used to access Servarr interface (if you use a domain enter the domain without a port)
URI = "http://192.168.1.106:8989"

# The Servarr API Key, Can be found it Settings > General > Security
APIKey = "[key redacted]"

# Category applied by Servarr to torrents in qBitTorrent, can be found in Settings > Download Clients > qBit > Category
Category = "tv-sonarr"

# Toggle whether to send a query to Servarr to search any failed torrents
ReSearch = true
Feramance commented 5 months ago

Hi, is it possible to get trace logs and your full config file please? Thanks

pokemonfirer commented 5 months ago

Hi, is it possible to get trace logs and your full config file please? Thanks

yep give me one min to get a log of it with sonarr reenabled

pokemonfirer commented 5 months ago

Hi, is it possible to get trace logs and your full config file please? Thanks

_qbitrr-qbitrr-1_logs.txt config.txt (renamed config to .txt as git dident like .toml) (only change to config is replacing the keys themselves as [REDACTED])

Feramance commented 5 months ago

Ok, so I'm going to need you to check a few things.

Firstly update this url with your API key and from the JSON data that appears, check the value of qualityProfileId: http://192.168.1.106:8989/api/v3/series/93814?includeSeasonImages=false&apikey=[APIKey]

After that, update the below url with your API key and the qualityProfileId you found in the above url and send me a screenshot of both please: http://192.168.1.106:8989/api/v3/qualitydefinition/[qualityProfileId]?apikey=[APIKey]

pokemonfirer commented 5 months ago

i thought the purpose of having a field for the api key made that not needed?

pokemonfirer commented 5 months ago

also it doesn't explain how radarr works perfectly fine yet sonarr is screaming about a key error

pokemonfirer commented 5 months ago

Ok, so I'm going to need you to check a few things.

Firstly update this url with your API key and from the JSON data that appears, check the value of qualityProfileId: http://192.168.1.106:8989/api/v3/series/93814?includeSeasonImages=false&apikey=[APIKey]

After that, update the below url with your API key and the qualityProfileId you found in the above url and send me a screenshot of both please: http://192.168.1.106:8989/api/v3/qualitydefinition/[qualityProfileId]?apikey=[APIKey]

also these URL's are no where in the config at all

Feramance commented 5 months ago

It's something to do in the series search, which I'm currently working on ensuring is working correctly as I've had a few issues with it lately so I'm going over the logic for it. disabling that setting won't yield any errors or very rarely and just once (it handles it).

Also those URLs are part of Sonarr's API, I just need to check the data that sonarr is returning for that specific series and ensuring the correct data is returning from the second URL. on my end I'm not having issues with them

pokemonfirer commented 5 months ago

It's something to do in the series search, which I'm currently working on ensuring is working correctly as I've had a few issues with it lately so I'm going over the logic for it. disabling that setting won't yield any errors or very rarely and just once (it handles it).

Also those URLs are part of Sonarr's API, I just need to check the data that sonarr is returning for that specific series and ensuring the correct data is returning from the second URL. on my end I'm not having issues with them

ok if they are part of the API where do i go about changing them?

Feramance commented 5 months ago

As described, in the URLs I sent you there are parts enclosed with square brackets [qualityProfileId ] and [APIKey]. Replace those values and open the URLs in your browser where you have access to Sonarr

pokemonfirer commented 5 months ago

Screenshot from 2024-02-05 04-57-56

Feramance commented 5 months ago

Which URL is that?

pokemonfirer commented 5 months ago

image api key mostly blurred

Feramance commented 5 months ago

So the series is the issue, I'll check this out and get ack to you

pokemonfirer commented 5 months ago

is there a way to figure out which series it is?

NathanWarrick commented 5 months ago

Active issue threads 😍 Keep up the good work fellas

Feramance commented 5 months ago

is there a way to figure out which series it is?

That URL should actually tell you, could potentially be there's a corrupt series Id, but I'm not sure yet

pokemonfirer commented 5 months ago

i do have a series with a non normal text name "Æon Flux" could this possibly be causing the issue?

Feramance commented 5 months ago

Wouldn't matter, the URL should still return the data for it, so it must be a bad ID

pokemonfirer commented 5 months ago

wish i could figure out which that way i can see if it can be removed

Feramance commented 5 months ago

go to this url and send me the full json response please, http://192.168.1.106:8989/api/v3/series?includeSeasonImages=false&apikey=[APIKey]

pokemonfirer commented 5 months ago

series.json warning its kinda big

Feramance commented 5 months ago

For the time being I suggest you disable the series search config option and you should have no issues that way

Feramance commented 5 months ago

Updating to the latest patch will fix the looping but won't fix the error, will happen either if the API returns bad data or if there's bad data in your Sonarr DB