cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1641
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()

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:


This community is intended for developer topics around Data Center technology and products. If you are looking for a non-developer topic about Data Center, you might find additional information in the Data Center and Cloud community