A bundle should not use urllib2, but the HTTP module from the framework.
Yes, that was just a quick example to show any urllib2 usage is broken and why I said including Plex framework things and gave examples.
HTTP.Request throws the exact same exception
def test_foundation():
url = "https://upload.wikimedia.org/wikipedia/commons/thumb/9/93/Utah_teapot_%28solid%29.stl/1200px-Utah_teapot_%28solid%29.stl.png"
Log.Info(u'Python Version %s', sys.version)
Log.Info(u'OpenSSL Version %s', ssl.OPENSSL_VERSION)
try:
HTTP.Request(url).content
except Exception, e:
Log.Error(e)
raise
2023-04-19 06:38:27,280 (40bc) : INFO (logkit:16) - Python Version 2.7.17 (default, Mar 17 2023, 22:05:45) [gcc]
2023-04-19 06:38:27,280 (40bc) : INFO (logkit:16) - OpenSSL Version OpenSSL 3.0.8 7 Feb 2023
2023-04-19 06:38:27,290 (40bc) : DEBUG (networking:144) - Requesting 'https://upload.wikimedia.org/wikipedia/commons/thumb/9/93/Utah_teapot_%28solid%29.stl/1200px-Utah_teapot_%28solid%29.stl.png'
2023-04-19 06:38:27,295 (40bc) : ERROR (logkit:22) - unknown error (_ssl.c:2938)
2023-04-19 06:38:27,296 (40bc) : CRITICAL (core:574) - Exception in the update function of agent named 'TestSeries', called with guid 'XXXX' (most recent call last):
File "C:\Program Files\Plex\Plex Media Server\Resources\Plug-ins-8521b7d99\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\api\agentkit.py", line 1093, in _update
agent.update(obj, media, lang, **kwargs)
File "C:\Users\TChil\AppData\Local\Plex Media Server\Plug-ins\Test.bundle\Contents\Code\__init__.py", line 565, in update
def update (self, metadata, media, lang, force ): Update (metadata, media, lang, force, False)
File "C:\Users\TChil\AppData\Local\Plex Media Server\Plug-ins\Test.bundle\Contents\Code\__init__.py", line 436, in Update
metadata.posters [thumb_channel] = Proxy.Media(HTTP.Request(thumb_channel).content, sort_order=1 if Prefs['media_poster_source']=='Channel' else 2)
File "C:\Users\TChil\AppData\Local\Plex Media Server\Plug-ins\Test.bundle\Contents\Code\__init__.py", line 197, in test_foundation
HTTP.Request(url).content
File "C:\Program Files\Plex\Plex Media Server\Resources\Plug-ins-8521b7d99\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\components\networking.py", line 251, in content
return self.__str__()
File "C:\Program Files\Plex\Plex Media Server\Resources\Plug-ins-8521b7d99\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\components\networking.py", line 229, in __str__
self.load()
File "C:\Program Files\Plex\Plex Media Server\Resources\Plug-ins-8521b7d99\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\components\networking.py", line 162, in load
f = self._opener.open(req, timeout=self._timeout)
File "C:\Program Files\Plex\Plex Media Server\python27.zip\urllib2.py", line 429, in open
response = self._open(req, data)
File "C:\Program Files\Plex\Plex Media Server\python27.zip\urllib2.py", line 447, in _open
'_open', req)
File "C:\Program Files\Plex\Plex Media Server\python27.zip\urllib2.py", line 407, in _call_chain
result = func(*args)
File "C:\Program Files\Plex\Plex Media Server\python27.zip\urllib2.py", line 1241, in https_open
context=self._context)
File "C:\Program Files\Plex\Plex Media Server\python27.zip\urllib2.py", line 1167, in do_open
h = http_class(host, timeout=req.timeout, **http_conn_args)
File "C:\Program Files\Plex\Plex Media Server\python27.zip\httplib.py", line 1274, in __init__
context = ssl._create_default_https_context()
File "C:\Program Files\Plex\Plex Media Server\python27.zip\ssl.py", line 445, in create_default_context
context.load_default_certs(purpose)
File "C:\Program Files\Plex\Plex Media Server\python27.zip\ssl.py", line 412, in load_default_certs
self._load_windows_store_certs(storename, purpose)
File "C:\Program Files\Plex\Plex Media Server\python27.zip\ssl.py", line 404, in _load_windows_store_certs
self.load_verify_locations(cadata=certs)
SSLError: unknown error (_ssl.c:2938)
When said, Python is NOT going to get upgraded
Alright, that’s all I wanted to know. Was just trying to help figure out why it all of the sudden broke horribly for people who still use plugins.