Skip to content

Getting SNIMissingWarning and InsecurePlatformWarning in python 2.7.3 #740

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
chan71 opened this issue Dec 28, 2016 · 1 comment
Closed

Comments

@chan71
Copy link

chan71 commented Dec 28, 2016

In which file did you encounter the issue?

transcribe_streaming.py

Did you change the file? If so, how?

Yes, see attached file.
trans_streaming_1.txt

Describe the issue

We executed a modified version of transcribe_straming.py on NAO robot OS which has python 2.7.3 as updating it to 2.7.9 or above is not possible due to the dependency of some of the NAO functionality on the python 2.7.3. We are getting the following warning messages when we run the modified script. In addition, we have tested the script with various buffer sizes and sleep times in reading data from arecord command to send to google cloud speech API just to find that transcripts are taking more time than it should when buffer size = 3200 and sleep = 0.1 s. For any other combination, it gives one error or the other.

I have given details of our observations in this comment of the ticket #738 .

/var/persistent/home/nao/googlespeech/env/lib/python2.7/site-packages/requests/packages/urllib3/util/ssl_.py:334: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
 SNIMissingWarning
/var/persistent/home/nao/googlespeech/env/lib/python2.7/site-packages/requests/packages/urllib3/util/ssl_.py:132: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
 InsecurePlatformWarning

As per the https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings and http://stackoverflow.com/questions/29134512/insecureplatformwarning-a-true-sslcontext-object-is-not-available-this-prevent we tried out fix the above warning but none was successful in NAO robot OS.

My questions are,

  1. Is there any issues that you have noticed in python 2.7.3 similar to above and is there a way other than updating python version to resolve these?
  2. Can this error contribute to a slowness in getting the transcripts from API?
@theacodes
Copy link
Contributor

Is there any issues that you have noticed in python 2.7.3 similar to above and is there a way other than updating python version to resolve these?

Use pyOpenSSL

  1. Can this error contribute to a slowness in getting the transcripts from API?

Unlikely

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants