blacktwin / JBOPS

Just a Bunch Of Plex Scripts
1.67k stars 307 forks source link

Bug plex_api_poster_pull.py #325

Closed snaj06 closed 2 years ago

snaj06 commented 2 years ago

Describe the bug

Since few days, python3 plex_api_poster_pull.py crash after few second. I have 2 folder Movies and TV_Show, some cover.jpg in Movies but just few then crash with this error. I tried on another server, same error.

python3 plex_api_poster_pull.py
Traceback (most recent call last):
  File "plex_api_poster_pull.py", line 73, in <module>
    urllib.request.urlretrieve(thumb_url, image_path)
  File "/usr/lib/python3.8/urllib/request.py", line 247, in urlretrieve
    with contextlib.closing(urlopen(url, data)) as fp:
  File "/usr/lib/python3.8/urllib/request.py", line 222, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.8/urllib/request.py", line 531, in open
    response = meth(req, response)
  File "/usr/lib/python3.8/urllib/request.py", line 640, in http_response
    response = self.parent.error(
  File "/usr/lib/python3.8/urllib/request.py", line 569, in error
    return self._call_chain(*args)
  File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.8/urllib/request.py", line 649, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 404: Not Found
blacktwin commented 2 years ago

Bad token?

snaj06 commented 2 years ago

I don't think so because I didn't change anything and it was working before. After crash (with this log) I have some covers in Movie folder so it's working few seconds (with this token) then it crashed.

To be sure, I tried some manual scan with my token and it's working :

curl -X GET "http://XX.XX.XX.XX:32400/library/sections/10/refresh?X-Plex-Token=xxxxxxxxxxxxxxxxxxxxx"