Plex Python errors since today - please help

Hi Plex Devs,

since a few hours, my Plex metadata scanner (legacy) throws Python errors. My setup did not change, agents did not change, QNAP server did not change.

Once these errors appeared, I tried to…

  • restart server
  • update QNAP PMS to latest beta
    … nothing helped.

The logs show Python errors:

2022-03-09 22:17:53,340 (7f1469c53808) :  CRITICAL (runtime:1299) - Exception getting hosted resource hashes (most recent call last):
  File "/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Resources/Plug-ins-980a13e02/Framework.bundle/Contents/Resources/Versions/2/Python/
Framework/components/runtime.py", line 1293, in get_resource_hashes
    json = self._core.networking.http_request("http://127.0.0.1:32400/:/plugins/com.plexapp.system/resourceHashes", timeout=10).content

  File "/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Resources/Plug-ins-980a13e02/Framework.bundle/Contents/Resources/Versions/2/Python/
Framework/components/networking.py", line 242, in content
    return self.__str__()
  File "/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Resources/Plug-ins-980a13e02/Framework.bundle/Contents/Resources/Versions/2/Python/
Framework/components/networking.py", line 220, in __str__
    self.load()
  File "/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Resources/Plug-ins-980a13e02/Framework.bundle/Contents/Resources/Versions/2/Python/
Framework/components/networking.py", line 158, in load
    f = self._opener.open(req, timeout=self._timeout)
  File "/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Resources/Python/python27.zip/urllib2.py", line 435, in open
    response = meth(req, response)
  File "/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Resources/Python/python27.zip/urllib2.py", line 548, in http_response
    'http', request, response, code, msg, hdrs)
  File "/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Resources/Python/python27.zip/urllib2.py", line 473, in error
    return self._call_chain(*args)
  File "/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Resources/Python/python27.zip/urllib2.py", line 407, in _call_chain
    result = func(*args)
...
2022-03-09 22:17:53,988 (7f14663d2b38) :  CRITICAL (agentkit:1095) - Exception in the update function of agent named 'OFDB', called wit
h guid 'com.plexapp.agents.imdb://tt0052753?lang=de' (most recent call last):
  File "/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Resources/Plug-ins-980a13e02/Framework.bundle/Contents/Resources/Versions/2/Python/
Framework/api/agentkit.py", line 1093, in _update
    agent.update(obj, media, lang, **kwargs)
  File "/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Library/Plex Media Server/Plug-ins/OFDB.bundle/Contents/Code/__init__.py", line 38,
 in update
    get_results(metadata)
  File "/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Library/Plex Media Server/Plug-ins/OFDB.bundle/Contents/Code/__init__.py", line 69,
 in get_results
    search_result = HTTP.Request(OFDB_SEARCH_URL % (metadata.id), sleep=1.0, cacheTime=CACHE_1WEEK).content
  File "/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Resources/Plug-ins-980a13e02/Framework.bundle/Contents/Resources/Versions/2/Python/
Framework/components/networking.py", line 242, in content
    return self.__str__()
  File "/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Resources/Plug-ins-980a13e02/Framework.bundle/Contents/Resources/Versions/2/Python/
Framework/components/networking.py", line 220, in __str__
    self.load()
  File "/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Resources/Plug-ins-980a13e02/Framework.bundle/Contents/Resources/Versions/2/Python/
Framework/components/networking.py", line 158, in load
    f = self._opener.open(req, timeout=self._timeout)
  File "/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Resources/Python/python27.zip/urllib2.py", line 429, in open
    response = self._open(req, data)
...

Last line is:
URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:727)>

I don’t know how to fix this… can some kind soul please try to nail down that error with me?

Looks like Python 2.7.9 introduced SSL Certificate Verification [which is nice] but it breaks stuff. Does anybody know how to temporarily disable that via

PYTHONHTTPSVERIFY=0

(where? how?)

I have logs from my system, but I won’t post them publicly…

The line you referenced is the first priority.

Last line is:
URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:727)>

Are you using your own certificate? From the information in your account at Plex.tv, it appears you are using QNAP’s certificates

No. I had not even a clue that a certificate would be necessary for any operation of an agent.
Everything worked like a charm without me playing with certificates.

Would you please look in your Network & Virtual Switch settings to find the adapter with IP address 253.253.253.253 ? Can you see what it is associated with?

This is the 2nd time I’ve seen it on QNAP hosts. It is something new to QTS

Not available. Will PM you an image of how my settings look like.

Thanks to @ChuckPa 's excellent support, I was able to track the problem:

The web SSL certificate of the metadata search page went invalid a couple of days ago. I sent out an email to the web site owner about that fact.
But, there’s an alternative web site alias (replacing “ssl” with “www”) that is not affected by the certificate date invalid problem.

Therefore, no further action needed at the moment. Thank you.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.