ManiMatter / decluttarr

Watches radarr, sonarr, lidarr, readarr and whisparr download queues and removes downloads if they become stalled or no longer needed.
GNU General Public License v3.0
99 stars 15 forks source link

Using A Self-signed Certificate Causes An Error #43

Closed swatcats closed 4 months ago

swatcats commented 4 months ago

I am using an https connection for my download client and a self-signed certificate seems to be causing an issue. It would be nice if there was an option to ignore any SSL verification errors.

ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate (_ssl.c:1007)

During handling of the above exception, another exception occurred:

urllib3.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate (_ssl.c:1007)

The above exception was the direct cause of the following exception:

urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='192.168.1.138', port=9080): Max retries exceeded with url: /api/v2/auth/login (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate (_ssl.c:1007)')))

During handling of the above exception, another exception occurred:

requests.exceptions.SSLError: HTTPSConnectionPool(host='192.168.1.138', port=9080): Max retries exceeded with url: /api/v2/auth/login (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate (_ssl.c:1007)')))

During handling of the above exception, another exception occurred:

UnboundLocalError: local variable 'response' referenced before assignment
ManiMatter commented 4 months ago

Hi there Not sure how to help here I‘m afraid.

Would you be able to run the script locally, try to find a fix for your specific setup and create a PR?

swatcats commented 4 months ago

This is my first time committing code, please double check it. Here is my Pull Request: https://github.com/ManiMatter/decluttarr/pull/46

ManiMatter commented 4 months ago

Just merged to dev and ran the container on my end; works for me. does the /dev image work for you too? If yes, will merge to /main

swatcats commented 4 months ago

does the /dev image work for you too?

Yes