Feramance / qBitrr

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

Stale Sonarr Entry Fails To Delete #65

Closed kqmaverick closed 3 months ago

kqmaverick commented 4 months ago

Seeing an issue with deleting staled sonarr entries. Below is from logs:


2024-03-03T19:35:20.236159878-08:00 [2024-03-03 19:35:20] [pid:       7][tid:140149037861760] DEBUG   : qBitrr.Sonarr  : Blocklisting: FAF1B358DF7DD3158CCADBBC21DE9EBA14371536 (Deleted)
2024-03-03T19:35:20.264342055-08:00 [2024-03-03 19:35:20] [pid:       7][tid:140149037861760] NOTICE  : qBitrr.Sonarr  : Re-Searching series: Blindspot (2015) | [tvdbId=295647|id=65]
2024-03-03T19:35:20.271846907-08:00 [2024-03-03 19:35:20] [pid:       7][tid:140149037861760] ERROR   : qBitrr.Sonarr  : Bad Request, possibly a bug. b'[\n  {\n    "propertyName": "Name",\n    "errorMessage": "\\u0027Name\\u0027 must not be empty.",\n    "severity": "error",\n    "errorCode": "NotNullValidator",\n    "formattedMessageArguments": [],\n    "formattedMessagePlaceholderValues": {\n      "propertyName": "Name",\n      "propertyValue": null\n    }\n  },\n  {\n    "propertyName": "Name",\n    "errorMessage": "\\u0027Name\\u0027 must not be empty.",\n    "severity": "error",\n    "errorCode": "NotEmptyValidator",\n    "formattedMessageArguments": [],\n    "formattedMessagePlaceholderValues": {\n      "propertyName": "Name",\n      "propertyValue": null\n    }\n  }\n]'
2024-03-03T19:35:20.271878031-08:00 Traceback (most recent call last):
2024-03-03T19:35:20.271893454-08:00   File "/usr/local/lib/python3.10/site-packages/qBitrr/arss.py", line 2976, in process_torrents
2024-03-03T19:35:20.271900178-08:00     self.process()
2024-03-03T19:35:20.271905717-08:00   File "/usr/local/lib/python3.10/site-packages/qBitrr/arss.py", line 2925, in process
2024-03-03T19:35:20.271911311-08:00     self._process_failed()
2024-03-03T19:35:20.271916769-08:00   File "/usr/local/lib/python3.10/site-packages/qBitrr/arss.py", line 1033, in _process_failed
2024-03-03T19:35:20.271926819-08:00     self._process_failed_individual(
2024-03-03T19:35:20.271933096-08:00   File "/usr/local/lib/python3.10/site-packages/qBitrr/arss.py", line 886, in _process_failed_individual
2024-03-03T19:35:20.271938700-08:00     self.client.post_command(self.search_api_command, seriesId=series_id)
2024-03-03T19:35:20.271944183-08:00   File "/usr/local/lib/python3.10/site-packages/pyarr/sonarr.py", line 71, in post_command
2024-03-03T19:35:20.271955246-08:00     return self._post("command", self.ver_uri, data=data)
2024-03-03T19:35:20.271961434-08:00   File "/usr/local/lib/python3.10/site-packages/pyarr/request_handler.py", line 125, in _post
2024-03-03T19:35:20.271968815-08:00     response = _process_response(res)
2024-03-03T19:35:20.271974843-08:00   File "/usr/local/lib/python3.10/site-packages/pyarr/request_handler.py", line 233, in _process_response
2024-03-03T19:35:20.271986443-08:00     raise PyarrBadRequest(f"Bad Request, possibly a bug. {str(res.content)}")
2024-03-03T19:35:20.271993960-08:00 pyarr.exceptions.PyarrBadRequest: Bad Request, possibly a bug. b'[\n  {\n    "propertyName": "Name",\n    "errorMessage": "\\u0027Name\\u0027 must not be empty.",\n    "severity": "error",\n    "errorCode": "NotNullValidator",\n    "formattedMessageArguments": [],\n    "formattedMessagePlaceholderValues": {\n      "propertyName": "Name",\n      "propertyValue": null\n    }\n  },\n  {\n    "propertyName": "Name",\n    "errorMessage": "\\u0027Name\\u0027 must not be empty.",\n    "severity": "error",\n    "errorCode": "NotEmptyValidator",\n    "formattedMessageArguments": [],\n    "formattedMessagePlaceholderValues": {\n      "propertyName": "Name",\n      "propertyValue": null\n    }\n  }\n]'```
Feramance commented 4 months ago

Can you please attach trace log?

kqmaverick commented 4 months ago

Watching it live it seems like it did delete and search again but was not properly blacklisted so it pulled the same download and then it stopped seeing it even though it was in qbitorrent and sonarr queue.

qbitrr_qbitrr-64bf545b8-rz8kn_qbitrr.log

Sonarr (1).log

Feramance commented 3 months ago

Ok so this is common especially when using public trackers. The Arrs do find multiple torrents with the same exact name but they're from different trackers so they count as different torrents and hence you end up with the same torrent being grabbed from somewhere different