westsurname / scripts

30 stars 4 forks source link

requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0) #2

Closed d3mystified closed 1 month ago

d3mystified commented 2 months ago
[2024-04-10 04:24:09.432253] radarr/sonarr: sonarr
[2024-04-10 04:24:09.432282] getFiles
[2024-04-10 04:24:09.432366] filename: Bad.Sisters.S01.2160p.ATVP.WEB-DL.DDP5.1.Atmos.DV.MKV.x265-NTb[rartv].magnet
[2024-04-10 04:24:09.433129] [Bad.Sisters.S01.2160p.ATVP.WEB-DL.DDP5.1.Atmos.DV.MKV.x265-NTb[rartv]] hash: 4D134D96ECFE0EE81E744B3F277E3202F18F6703
[2024-04-10 04:24:10.012965] [Bad.Sisters.S01.2160p.ATVP.WEB-DL.DDP5.1.Atmos.DV.MKV.x265-NTb[rartv]] instantAvailabilities: {'4d134d96ecfe0ee81e744b3f277e3202f18f6703': {'rd': []}}
[2024-04-10 04:24:10.015436] [Bad.Sisters.S01.2160p.ATVP.WEB-DL.DDP5.1.Atmos.DV.MKV.x265-NTb[rartv]] instantAvailability: False
[2024-04-10 04:24:10.015524] [Bad.Sisters.S01.2160p.ATVP.WEB-DL.DDP5.1.Atmos.DV.MKV.x265-NTb[rartv]] Failing
[2024-04-10 04:24:10.032244] [Bad.Sisters.S01.2160p.ATVP.WEB-DL.DDP5.1.Atmos.DV.MKV.x265-NTb[rartv]] Error processing Bad.Sisters.S01.2160p.ATVP.WEB-DL.DDP5.1.Atmos.DV.MKV.x265-NTb[rartv]
[2024-04-10 04:24:10.032331] [Bad.Sisters.S01.2160p.ATVP.WEB-DL.DDP5.1.Atmos.DV.MKV.x265-NTb[rartv]] Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/requests/models.py", line 971, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/local/lib/python3.8/json/__init__.py", line 357, in loads
    return _default_decoder.decode(s)
  File "/usr/local/lib/python3.8/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/local/lib/python3.8/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/blackhole.py", line 310, in processFile
    if torrent.submitTorrent():
  File "/app/blackhole.py", line 88, in submitTorrent
    self.fail(self)
  File "/app/blackhole.py", line 293, in fail
    history = arr.getHistory(blackhole['historyPageSize'])['records']
  File "/app/shared/arr.py", line 160, in getHistory
    history = historyRequest.json()
  File "/usr/local/lib/python3.8/site-packages/requests/models.py", line 975, in json
    raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Magnet:

magnet:?xt=urn:btih:4D134D96ECFE0EE81E744B3F277E3202F18F6703&dn=Bad.Sisters.S01.2160p.ATVP.WEB-DL.DDP5.1.Atmos.DV.MKV.x265-NTb%5brartv%5d&tr=http%3a%2f%2ftracker.opentrackr.org%3a1337%2fannounce&tr=udp%3a%2f%2ftracker.auctor.tv%3a6969%2fannounce&tr=udp%3a%2f%2fopentracker.i2p.rocks%3a6969%2fannounce&tr=https%3a%2f%2fopentracker.i2p.rocks%3a443%2fannounce&tr=udp%3a%2f%2fopen.demonii.com%3a1337%2fannounce&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a6969%2fannounce&tr=http%3a%2f%2ftracker.openbittorrent.com%3a80%2fannounce&tr=udp%3a%2f%2fopen.stealth.si%3a80%2fannounce&tr=udp%3a%2f%2ftracker.torrent.eu.org%3a451%2fannounce&tr=udp%3a%2f%2ftracker.moeking.me%3a6969%2fannounce&tr=udp%3a%2f%2fexplodie.org%3a6969%2fannounce&tr=udp%3a%2f%2fexodus.desync.com%3a6969%2fannounce&tr=udp%3a%2f%2fuploads.gamecoast.net%3a6969%2fannounce&tr=udp%3a%2f%2ftracker1.bt.moack.co.kr%3a80%2fannounce&tr=udp%3a%2f%2ftracker.tiny-vps.com%3a6969%2fannounce&tr=udp%3a%2f%2ftracker.theoks.net%3a6969%2fannounce&tr=udp%3a%2f%2ftracker.skyts.net%3a6969%2fannounce&tr=udp%3a%2f%2ftracker-udp.gbitt.info%3a80
d3mystified commented 2 months ago

Another one:

[2024-04-10 04:29:00.366130] filename: The.Act.S01.2160p.HULU.WEB-DL.x265.10bit.HDR10Plus.DDP5.1-NTb[rartv].magnet
[2024-04-10 04:29:00.366645] [The.Act.S01.2160p.HULU.WEB-DL.x265.10bit.HDR10Plus.DDP5.1-NTb[rartv]] hash: 715A173D0A8F30469F470A4D651E20A6EEAE4FD2
[2024-04-10 04:29:01.074568] [The.Act.S01.2160p.HULU.WEB-DL.x265.10bit.HDR10Plus.DDP5.1-NTb[rartv]] instantAvailabilities: {'715a173d0a8f30469f470a4d651e20a6eeae4fd2': {'rd': []}}
[2024-04-10 04:29:01.077236] [The.Act.S01.2160p.HULU.WEB-DL.x265.10bit.HDR10Plus.DDP5.1-NTb[rartv]] instantAvailability: False
[2024-04-10 04:29:01.077325] [The.Act.S01.2160p.HULU.WEB-DL.x265.10bit.HDR10Plus.DDP5.1-NTb[rartv]] Failing
[2024-04-10 04:29:01.087774] [The.Act.S01.2160p.HULU.WEB-DL.x265.10bit.HDR10Plus.DDP5.1-NTb[rartv]] Error processing The.Act.S01.2160p.HULU.WEB-DL.x265.10bit.HDR10Plus.DDP5.1-NTb[rartv]
[2024-04-10 04:29:01.087861] [The.Act.S01.2160p.HULU.WEB-DL.x265.10bit.HDR10Plus.DDP5.1-NTb[rartv]] Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/requests/models.py", line 971, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/local/lib/python3.8/json/__init__.py", line 357, in loads
    return _default_decoder.decode(s)
  File "/usr/local/lib/python3.8/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/local/lib/python3.8/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/blackhole.py", line 310, in processFile
    if torrent.submitTorrent():
  File "/app/blackhole.py", line 88, in submitTorrent
    self.fail(self)
  File "/app/blackhole.py", line 293, in fail
    history = arr.getHistory(blackhole['historyPageSize'])['records']
  File "/app/shared/arr.py", line 160, in getHistory
    history = historyRequest.json()
  File "/usr/local/lib/python3.8/site-packages/requests/models.py", line 975, in json
    raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
westsurname commented 2 months ago

Is this still an issue? Does this happen every file?

d3mystified commented 2 months ago

Yes

[2024-05-04 17:54:30.059794] filename: Frasier.S01.1080p.BluRay.x264-Gi6[rartv].magnet
[2024-05-04 17:54:30.061014] [Frasier.S01.1080p.BluRay.x264-Gi6[rartv]] hash: 8115106FAFD02173450746E7CFEB311485B44F12
[2024-05-04 17:54:30.702567] [Frasier.S01.1080p.BluRay.x264-Gi6[rartv]] instantAvailabilities: {'8115106fafd02173450746e7cfeb311485b44f12': []}
[2024-05-04 17:54:30.705371] [Frasier.S01.1080p.BluRay.x264-Gi6[rartv]] instantAvailability: False
[2024-05-04 17:54:30.705464] [Frasier.S01.1080p.BluRay.x264-Gi6[rartv]] Failing
[2024-05-04 17:54:30.716997] [Frasier.S01.1080p.BluRay.x264-Gi6[rartv]] Error processing Frasier.S01.1080p.BluRay.x264-Gi6[rartv]
[2024-05-04 17:54:30.717083] [Frasier.S01.1080p.BluRay.x264-Gi6[rartv]] Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/requests/models.py", line 971, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/local/lib/python3.8/json/__init__.py", line 357, in loads
    return _default_decoder.decode(s)
  File "/usr/local/lib/python3.8/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/local/lib/python3.8/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/blackhole.py", line 310, in processFile
    if torrent.submitTorrent():
  File "/app/blackhole.py", line 88, in submitTorrent
    self.fail(self)
  File "/app/blackhole.py", line 293, in fail
    history = arr.getHistory(blackhole['historyPageSize'])['records']
  File "/app/shared/arr.py", line 160, in getHistory
    history = historyRequest.json()
  File "/usr/local/lib/python3.8/site-packages/requests/models.py", line 975, in json
    raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

[2024-05-04 17:54:31.061710] Exit 'on_created'
westsurname commented 2 months ago

@d3mystified Does this happen for every file? If yes, that means your arr(s) are likely not set up in the env file properly. If not, that would indicate that sometimes your arr(s) are timing out or returning some other error instead of a good response.

westsurname commented 1 month ago

Closed due to inactivity. Feel free to reopen if still an issue.

d3mystified commented 3 weeks ago

Hey sorry meant to reply but got busy.

Happened again:

[2024-06-11 03:14:56.565212] [RealDebridMagnet] [moviepass.moviecrash.2024.1080p.web.h264-showbusinesstonobusiness.mkv] Torrent folder not found in filesystem: moviepass.moviecrash.2024.1080p.web.h264-showbusinesstonobusiness.mkv
[2024-06-11 03:14:56.565255] [RealDebridMagnet] [moviepass.moviecrash.2024.1080p.web.h264-showbusinesstonobusiness.mkv] Failing
[2024-06-11 03:14:56.597499] [moviepass.moviecrash.2024.1080p.web.h264-showbusinesstonobusiness.mkv] Error processing moviepass.moviecrash.2024.1080p.web.h264-showbusinesstonobusiness.mkv
[2024-06-11 03:14:56.597526] [moviepass.moviecrash.2024.1080p.web.h264-showbusinesstonobusiness.mkv] Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/requests/models.py", line 971, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/local/lib/python3.8/json/__init__.py", line 357, in loads
    return _default_decoder.decode(s)
  File "/usr/local/lib/python3.8/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/local/lib/python3.8/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/blackhole.py", line 306, in processFile
    fail(torrent, arr)
  File "/app/blackhole.py", line 326, in fail
    history = arr.getHistory(blackhole['historyPageSize'])['records']
  File "/app/shared/arr.py", line 205, in getHistory
    history = historyRequest.json()
  File "/usr/local/lib/python3.8/site-packages/requests/models.py", line 975, in json
    raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

[2024-06-11 03:14:56.597672] getFiles
[2024-06-11 03:14:57.599235] Exit 'on_created'

Does not happen for every file. It's pretty sporadic. I think some happen because the torrent is blocked in RD due to take down. But this one for eg gets added successfully and gets mounted by zurg successfully as well.

My arr also seems to be working okay, no issues at all. Could be a transient issue I guess, so maybe this logic should have a retry?

d3mystified commented 3 weeks ago

Actually I just tried 3 more and they all fail. Nothing about my setup has changed and the last successful import was yesterday from the arr's. So no clue what's going on. I can curl my arr's just fine from the docker network that blackhole is a part of.

wokkieman commented 2 weeks ago

Actually I just tried 3 more and they all fail. Nothing about my setup has changed and the last successful import was yesterday from the arr's. So no clue what's going on. I can curl my arr's just fine from the docker network that blackhole is a part of.

had the same issue, check your env file

RADARR_HOST=http://xxx:7878 <=== without / at the end