Hello,
I'm new with python, i have download the plugin check_dell_warranty.py to monitor our DELL servers warranty but when i try to execute the script i have the following errors:
I tried following solution but still the same error:
1- Disabling the warning still the same error:
2- Verification of the certificate with Python 2.7 still the same error:
3- Upgrading from Python 2.7 to 3.5 and did the steps for Python 3.xx still the same error:
Even when i tried to validate the certificate for h t t p s : / / google.com i got an error:
CentOS 7 as operating system.
Please any help !
Thank you.
I'm new with python, i have download the plugin check_dell_warranty.py to monitor our DELL servers warranty but when i try to execute the script i have the following errors:
Quote:/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:852: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: h t t p s : / / urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)
Unable to contact url: h t t p s : / / api.dell.com/support/v2/assetinfo/warranty/tags.json
I tried following solution but still the same error:
Quote:urllib3.readthedocs.io /en/latest/advanced-usage.html#ssl-warnings
1- Disabling the warning still the same error:
Quote:>>> import urllib3
>>> urllib3.disable_warnings()
2- Verification of the certificate with Python 2.7 still the same error:
Quote:pip install urllib3[secure]
>>> import urllib3.contrib.pyopenssl
>>> urllib3.contrib.pyopenssl.inject_into_urllib3()
>>> import certifi
>>> import urllib3
>>> http = urllib3.PoolManager(
... cert_reqs='CERT_REQUIRED',
... ca_certs=certifi.where())
3- Upgrading from Python 2.7 to 3.5 and did the steps for Python 3.xx still the same error:
Quote:pip install certifi
pip install urllib3[secure]
>>> import certifi
>>> import urllib3
>>> http = urllib3.PoolManager(
... cert_reqs='CERT_REQUIRED',
... ca_certs=certifi.where())
Even when i tried to validate the certificate for h t t p s : / / google.com i got an error:
Quote:>>> http.request('GET', 'h t t p s : / / google.com')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'http' is not defined
CentOS 7 as operating system.
Please any help !
Thank you.