cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1643
Views
11
Helpful
1
Replies

HOW DO I GET RID OF THE INSECUREREQUESTWARNING FROM COBRA SDK?

marcedav
Cisco Employee
Cisco Employee

Whenever I request a token via Cobra SDK or through the Request module I get the following error:

InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html (This warning will only appear once by default.)

Is there a way to get rid of this?

1 Reply 1

sheastma
Cisco Employee
Cisco Employee

This answer was contributed by Mike Timm:


This warning actually comes from Requests module version 2.4.0 and later. You can get rid of the warning by adding the following to your scripts:

import requests.packages.urllib3
requests.packages.urllib3.disable_warnings()