henryjfry / repository.thenewdiamond

9 stars 4 forks source link

[Bug] extendedinfo - SSL: CERTIFICATE_VERIFY_FAILED #11

Open matke-84 opened 2 years ago

matke-84 commented 2 years ago

Sometimes they throw out this error.

2022-06-11 17:30:35.272 T:8148    ERROR <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                                    - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                                   Error Type: <class 'requests.exceptions.SSLError'>
                                                   Error Contents: HTTPSConnectionPool(host='bit.ly', port=443): Max retries exceeded with url: /2WABGMg (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1128)')))
                                                   Traceback (most recent call last):
                                                     File "C:\Users\Marko\AppData\Roaming\Kodi\addons\script.module.urllib3\lib\urllib3\connectionpool.py", line 699, in urlopen
                                                       httplib_response = self._make_request(
                                                     File "C:\Users\Marko\AppData\Roaming\Kodi\addons\script.module.urllib3\lib\urllib3\connectionpool.py", line 382, in _make_request
                                                       self._validate_conn(conn)
                                                     File "C:\Users\Marko\AppData\Roaming\Kodi\addons\script.module.urllib3\lib\urllib3\connectionpool.py", line 1010, in _validate_conn
                                                       conn.connect()
                                                     File "C:\Users\Marko\AppData\Roaming\Kodi\addons\script.module.urllib3\lib\urllib3\connection.py", line 411, in connect
                                                       self.sock = ssl_wrap_socket(
                                                     File "C:\Users\Marko\AppData\Roaming\Kodi\addons\script.module.urllib3\lib\urllib3\util\ssl_.py", line 428, in ssl_wrap_socket
                                                       ssl_sock = _ssl_wrap_socket_impl(
                                                     File "C:\Users\Marko\AppData\Roaming\Kodi\addons\script.module.urllib3\lib\urllib3\util\ssl_.py", line 472, in _ssl_wrap_socket_impl
                                                       return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
                                                     File "C:\Program Files\Kodi\system\python\Lib\ssl.py", line 500, in wrap_socket
                                                       return self.sslsocket_class._create(
                                                     File "C:\Program Files\Kodi\system\python\Lib\ssl.py", line 1040, in _create
                                                       self.do_handshake()
                                                     File "C:\Program Files\Kodi\system\python\Lib\ssl.py", line 1309, in do_handshake
                                                       self._sslobj.do_handshake()
                                                   ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1128)

                                                   During handling of the above exception, another exception occurred:

                                                   Traceback (most recent call last):
                                                     File "C:\Users\Marko\AppData\Roaming\Kodi\addons\script.module.requests\lib\requests\adapters.py", line 439, in send
                                                       resp = conn.urlopen(
                                                     File "C:\Users\Marko\AppData\Roaming\Kodi\addons\script.module.urllib3\lib\urllib3\connectionpool.py", line 755, in urlopen
                                                       retries = retries.increment(
                                                     File "C:\Users\Marko\AppData\Roaming\Kodi\addons\script.module.urllib3\lib\urllib3\util\retry.py", line 574, in increment
                                                       raise MaxRetryError(_pool, url, error or ResponseError(cause))
                                                   urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='bit.ly', port=443): Max retries exceeded with url: /2WABGMg (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1128)')))

                                                   During handling of the above exception, another exception occurred:

                                                   Traceback (most recent call last):
                                                     File "C:\Users\Marko\AppData\Roaming\Kodi\addons\script.extendedinfo\plugin.py", line 222, in <module>
                                                       Main()
                                                     File "C:\Users\Marko\AppData\Roaming\Kodi\addons\script.extendedinfo\plugin.py", line 64, in __init__
                                                       data = requests.get(imdb_json).json()
                                                     File "C:\Users\Marko\AppData\Roaming\Kodi\addons\script.module.requests\lib\requests\api.py", line 76, in get
                                                       return request('get', url, params=params, **kwargs)
                                                     File "C:\Users\Marko\AppData\Roaming\Kodi\addons\script.module.requests\lib\requests\api.py", line 61, in request
                                                       return session.request(method=method, url=url, **kwargs)
                                                     File "C:\Users\Marko\AppData\Roaming\Kodi\addons\script.module.requests\lib\requests\sessions.py", line 542, in request
                                                       resp = self.send(prep, **send_kwargs)
                                                     File "C:\Users\Marko\AppData\Roaming\Kodi\addons\script.module.requests\lib\requests\sessions.py", line 655, in send
                                                       r = adapter.send(request, **kwargs)
                                                     File "C:\Users\Marko\AppData\Roaming\Kodi\addons\script.module.requests\lib\requests\adapters.py", line 514, in send
                                                       raise SSLError(e, request=request)
                                                   requests.exceptions.SSLError: HTTPSConnectionPool(host='bit.ly', port=443): Max retries exceeded with url: /2WABGMg (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1128)')))
                                                   -->End of Python script error report<--

2022-06-11 17:30:35.554 T:8148     INFO <general>: Python interpreter stopped
2022-06-11 17:30:40.281 T:16032    INFO <general>: initializing python engine.
2022-06-11 17:30:40.324 T:18296   ERROR <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                                    - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                                   Error Type: <class 'requests.exceptions.SSLError'>
                                                   Error Contents: HTTPSConnectionPool(host='bit.ly', port=443): Max retries exceeded with url: /2WABGMg (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1128)')))
                                                   Traceback (most recent call last):
                                                     File "C:\Users\Marko\AppData\Roaming\Kodi\addons\script.module.urllib3\lib\urllib3\connectionpool.py", line 699, in urlopen
                                                       httplib_response = self._make_request(
                                                     File "C:\Users\Marko\AppData\Roaming\Kodi\addons\script.module.urllib3\lib\urllib3\connectionpool.py", line 382, in _make_request
                                                       self._validate_conn(conn)
                                                     File "C:\Users\Marko\AppData\Roaming\Kodi\addons\script.module.urllib3\lib\urllib3\connectionpool.py", line 1010, in _validate_conn
                                                       conn.connect()
                                                     File "C:\Users\Marko\AppData\Roaming\Kodi\addons\script.module.urllib3\lib\urllib3\connection.py", line 411, in connect
                                                       self.sock = ssl_wrap_socket(
                                                     File "C:\Users\Marko\AppData\Roaming\Kodi\addons\script.module.urllib3\lib\urllib3\util\ssl_.py", line 428, in ssl_wrap_socket
                                                       ssl_sock = _ssl_wrap_socket_impl(
                                                     File "C:\Users\Marko\AppData\Roaming\Kodi\addons\script.module.urllib3\lib\urllib3\util\ssl_.py", line 472, in _ssl_wrap_socket_impl
                                                       return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
                                                     File "C:\Program Files\Kodi\system\python\Lib\ssl.py", line 500, in wrap_socket
                                                       return self.sslsocket_class._create(
                                                     File "C:\Program Files\Kodi\system\python\Lib\ssl.py", line 1040, in _create
                                                       self.do_handshake()
                                                     File "C:\Program Files\Kodi\system\python\Lib\ssl.py", line 1309, in do_handshake
                                                       self._sslobj.do_handshake()
                                                   ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1128)

                                                   During handling of the above exception, another exception occurred:

                                                   Traceback (most recent call last):
                                                     File "C:\Users\Marko\AppData\Roaming\Kodi\addons\script.module.requests\lib\requests\adapters.py", line 439, in send
                                                       resp = conn.urlopen(
                                                     File "C:\Users\Marko\AppData\Roaming\Kodi\addons\script.module.urllib3\lib\urllib3\connectionpool.py", line 755, in urlopen
                                                       retries = retries.increment(
                                                     File "C:\Users\Marko\AppData\Roaming\Kodi\addons\script.module.urllib3\lib\urllib3\util\retry.py", line 574, in increment
                                                       raise MaxRetryError(_pool, url, error or ResponseError(cause))
                                                   urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='bit.ly', port=443): Max retries exceeded with url: /2WABGMg (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1128)')))

                                                   During handling of the above exception, another exception occurred:

                                                   Traceback (most recent call last):
                                                     File "C:\Users\Marko\AppData\Roaming\Kodi\addons\script.extendedinfo\plugin.py", line 222, in <module>
                                                       Main()
                                                     File "C:\Users\Marko\AppData\Roaming\Kodi\addons\script.extendedinfo\plugin.py", line 64, in __init__
                                                       data = requests.get(imdb_json).json()
                                                     File "C:\Users\Marko\AppData\Roaming\Kodi\addons\script.module.requests\lib\requests\api.py", line 76, in get
                                                       return request('get', url, params=params, **kwargs)
                                                     File "C:\Users\Marko\AppData\Roaming\Kodi\addons\script.module.requests\lib\requests\api.py", line 61, in request
                                                       return session.request(method=method, url=url, **kwargs)
                                                     File "C:\Users\Marko\AppData\Roaming\Kodi\addons\script.module.requests\lib\requests\sessions.py", line 542, in request
                                                       resp = self.send(prep, **send_kwargs)
                                                     File "C:\Users\Marko\AppData\Roaming\Kodi\addons\script.module.requests\lib\requests\sessions.py", line 655, in send
                                                       r = adapter.send(request, **kwargs)
                                                     File "C:\Users\Marko\AppData\Roaming\Kodi\addons\script.module.requests\lib\requests\adapters.py", line 514, in send
                                                       raise SSLError(e, request=request)
                                                   requests.exceptions.SSLError: HTTPSConnectionPool(host='bit.ly', port=443): Max retries exceeded with url: /2WABGMg (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1128)')))
                                                   -->End of Python script error report<--
matke-84 commented 2 years ago

It also throws out this error.

2022-06-11 21:59:10.257 T:12840   ERROR <general>: Exception in thread 
2022-06-11 21:59:10.257 T:12840   ERROR <general>: Cron Thread
2022-06-11 21:59:10.257 T:12840   ERROR <general>: :

2022-06-11 21:59:10.257 T:12840   ERROR <general>: Traceback (most recent call last):

2022-06-11 21:59:10.257 T:12840   ERROR <general>:   File "C:\Program Files\Kodi\system\python\Lib\threading.py", line 932, in _bootstrap_inner

2022-06-11 21:59:10.257 T:12840   ERROR <general>:     
2022-06-11 21:59:10.258 T:12840   ERROR <general>: self.run()
2022-06-11 21:59:10.258 T:12840   ERROR <general>: 

2022-06-11 21:59:10.258 T:12840   ERROR <general>:   File "C:\Users\Marko\AppData\Roaming\Kodi\addons\script.extendedinfo\service.py", line 918, in run

2022-06-11 21:59:10.258 T:12840   ERROR <general>:     
2022-06-11 21:59:10.258 T:12840   ERROR <general>: library.trakt_refresh_all()
2022-06-11 21:59:10.258 T:12840   ERROR <general>: 

2022-06-11 21:59:10.258 T:12840   ERROR <general>:   File "C:\Users\Marko\AppData\Roaming\Kodi\addons\script.extendedinfo\resources\lib\library.py", line 1051, in trakt_refresh_all

2022-06-11 21:59:10.259 T:12840   ERROR <general>:     
2022-06-11 21:59:10.259 T:12840   ERROR <general>: trakt_collection_shows(cache_days=0.00001)
2022-06-11 21:59:10.259 T:12840   ERROR <general>: 

2022-06-11 21:59:10.259 T:12840   ERROR <general>:   File "C:\Users\Marko\AppData\Roaming\Kodi\addons\script.extendedinfo\resources\lib\library.py", line 1267, in trakt_collection_shows

2022-06-11 21:59:10.259 T:12840   ERROR <general>:     
2022-06-11 21:59:10.259 T:12840   ERROR <general>: for i in response:
2022-06-11 21:59:10.259 T:12840   ERROR <general>: 

2022-06-11 21:59:10.260 T:12840   ERROR <general>: TypeError
2022-06-11 21:59:10.260 T:12840   ERROR <general>: : 
2022-06-11 21:59:10.260 T:12840   ERROR <general>: 'NoneType' object is not iterable
2022-06-11 21:59:10.260 T:12840   ERROR <general>: 
henryjfry commented 1 year ago

Ok so the SSL error is with a bittly url, so the imdb/trakt json file which is loaded for additional lists. You can provide you own one by adding a different url or file path in the settings.

So if you have issues with the current one you can change it.

The other error is because you have no items in your collection and it triggers an error. I think the newest version I should have accounted for it. But I dont have an empty tv or movie collection so i cant exactly test it. I could maybe add another setting option?