jmcarp / jmcarp/robobrowser

InsecurePlatformWarning

Open
#46 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
3.7k
Forks
336
PR merge metrics
No merged PRs in 30d

Description

I am logging into an HTTPS site, and robobrowser is working great. However, every time my script runs I am getting an 'InsecurePlatformWarning'. When I use my normal browser to log into this site, I am not getting any warnings at all. For reference the site I am logging into is http://didlogic.com

This is the warning:

> /Library/Python/2.7/site-packages/requests-2.7.0-py2.7.egg/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
> InsecurePlatformWarning

While its not impacting the script, it is somewhat annoying to see. A workaround that I have found (using the URL in the warning) is to use the logging module to capture these warnings:

> import logging
> logging.captureWarnings(True)

This will stop this warning from being displayed on screen, and instead re-route them to the logging module (which is not being recorded anywhere)

Thanks,

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.