Skip to content
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

openssl failed when downloading en from snips_nlu in windows m/c #773

Closed
vaibhavkrishn opened this issue Jul 18, 2018 · 3 comments
Closed

Comments

@vaibhavkrishn
Copy link

vaibhavkrishn commented Jul 18, 2018

Hi team I am using python 3.6.6 in windows 10 os (64 bit version). I am able to successfully install snips_nlu using pip but downloading en laguage package is causing openssl failure. Here is the complete stack trace :

C:\Users\vbanagiri>python -m snips_nlu download en
Traceback (most recent call last):
  File "C:\Users\vbanagiri\AppData\Local\Programs\Python\Python36\lib\site-packages\urllib3\contrib\pyopenssl.py", line 441, in wrap_socket
    cnx.do_handshake()
  File "C:\Users\vbanagiri\AppData\Local\Programs\Python\Python36\lib\site-packages\OpenSSL\SSL.py", line 1907, in do_handshake
    self._raise_ssl_error(self._ssl, result)
  File "C:\Users\vbanagiri\AppData\Local\Programs\Python\Python36\lib\site-packages\OpenSSL\SSL.py", line 1639, in _raise_ssl_error
    _raise_current_error()
  File "C:\Users\vbanagiri\AppData\Local\Programs\Python\Python36\lib\site-packages\OpenSSL\_util.py", line 54, in exception_from_error_queue
    raise exception_type(errors)
OpenSSL.SSL.Error: [('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\vbanagiri\AppData\Local\Programs\Python\Python36\lib\site-packages\urllib3\connectionpool.py", line 601, in urlopen
    chunked=chunked)
  File "C:\Users\vbanagiri\AppData\Local\Programs\Python\Python36\lib\site-packages\urllib3\connectionpool.py", line 346, in _make_request
    self._validate_conn(conn)
  File "C:\Users\vbanagiri\AppData\Local\Programs\Python\Python36\lib\site-packages\urllib3\connectionpool.py", line 850, in _validate_conn
    conn.connect()
  File "C:\Users\vbanagiri\AppData\Local\Programs\Python\Python36\lib\site-packages\urllib3\connection.py", line 326, in connect
    ssl_context=context)
  File "C:\Users\vbanagiri\AppData\Local\Programs\Python\Python36\lib\site-packages\urllib3\util\ssl_.py", line 329, in ssl_wrap_socket
    return context.wrap_socket(sock, server_hostname=server_hostname)
  File "C:\Users\vbanagiri\AppData\Local\Programs\Python\Python36\lib\site-packages\urllib3\contrib\pyopenssl.py", line 448, in wrap_socket
    raise ssl.SSLError('bad handshake: %r' % e)
ssl.SSLError: ("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],)",)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\vbanagiri\AppData\Local\Programs\Python\Python36\lib\site-packages\requests\adapters.py", line 440, in send
    timeout=timeout
  File "C:\Users\vbanagiri\AppData\Local\Programs\Python\Python36\lib\site-packages\urllib3\connectionpool.py", line 639, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "C:\Users\vbanagiri\AppData\Local\Programs\Python\Python36\lib\site-packages\urllib3\util\retry.py", line 388, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='raw.githubusercontent.com', port=443): Max retries exceeded with url: /snipsco/snips-nlu-language-resources/master/shortcuts.json (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],)",),))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\vbanagiri\AppData\Local\Programs\Python\Python36\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Users\vbanagiri\AppData\Local\Programs\Python\Python36\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\vbanagiri\AppData\Local\Programs\Python\Python36\lib\site-packages\snips_nlu\__main__.py", line 36, in <module>
    main()
  File "C:\Users\vbanagiri\AppData\Local\Programs\Python\Python36\lib\site-packages\snips_nlu\__main__.py", line 29, in main
    plac.call(commands[command], sys.argv[1:])
  File "C:\Users\vbanagiri\AppData\Local\Programs\Python\Python36\lib\site-packages\plac_core.py", line 328, in call
    cmd, result = parser.consume(arglist)
  File "C:\Users\vbanagiri\AppData\Local\Programs\Python\Python36\lib\site-packages\plac_core.py", line 207, in consume
    return cmd, self.func(*(args + varargs + extraopts), **kwargs)
  File "C:\Users\vbanagiri\AppData\Local\Programs\Python\Python36\lib\site-packages\snips_nlu\cli\download.py", line 27, in download
    shortcuts = get_json(__about__.__shortcuts__, "Resource shortcuts")
  File "C:\Users\vbanagiri\AppData\Local\Programs\Python\Python36\lib\site-packages\snips_nlu\cli\utils.py", line 26, in get_json
    r = requests.get(url)
  File "C:\Users\vbanagiri\AppData\Local\Programs\Python\Python36\lib\site-packages\requests\api.py", line 72, in get
    return request('get', url, params=params, **kwargs)
  File "C:\Users\vbanagiri\AppData\Local\Programs\Python\Python36\lib\site-packages\requests\api.py", line 58, in request
    return session.request(method=method, url=url, **kwargs)
  File "C:\Users\vbanagiri\AppData\Local\Programs\Python\Python36\lib\site-packages\requests\sessions.py", line 508, in request
    resp = self.send(prep, **send_kwargs)
  File "C:\Users\vbanagiri\AppData\Local\Programs\Python\Python36\lib\site-packages\requests\sessions.py", line 618, in send
    r = adapter.send(request, **kwargs)
  File "C:\Users\vbanagiri\AppData\Local\Programs\Python\Python36\lib\site-packages\requests\adapters.py", line 506, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='raw.githubusercontent.com', port=443): Max retries exceeded with url: /snipsco/snips-nlu-language-resources/master/shortcuts.json (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],)",),))

Here is the pip freeze of my machine :

C:\Users\vbanagiri> pip freeze
absl-py==0.2.2
APScheduler==3.5.1
asn1crypto==0.24.0
astor==0.7.1
attrs==18.1.0
Automat==0.7.0
bleach==1.5.0
boto3==1.7.58
botocore==1.10.58
certifi==2018.4.16
cffi==1.11.5
chardet==3.0.4
click==6.7
cloudpickle==0.5.3
colorama==0.3.9
coloredlogs==10.0
colorhash==1.0.2
ConfigArgParse==0.13.0
constantly==15.1.0
cryptography==2.2.1
cycler==0.10.0
cymem==1.31.2
cytoolz==0.8.2
decorator==4.3.0
dill==0.2.8.2
docopt==0.6.2
docutils==0.14
en-core-web-md==2.0.0
enum34==1.1.6
fakeredis==0.10.3
fbmessenger==5.3.0
Flask==1.0.2
Flask-Cors==3.0.6
future==0.16.0
gast==0.2.0
gevent==1.3.5
graphviz==0.8.4
greenlet==0.4.13
grpcio==1.13.0
h5py==2.8.0
html5lib==0.9999999
humanfriendly==4.15.1
hyperlink==18.0.0
idna==2.6
incremental==17.5.0
itsdangerous==0.24
Jinja2==2.10
jmespath==0.9.3
jsonpickle==0.9.6
jsonschema==2.6.0
Keras==2.2.0
Keras-Applications==1.0.2
Keras-Preprocessing==1.0.1
kiwisolver==1.0.1
klein==17.10.0
Markdown==2.6.11
MarkupSafe==1.0
matplotlib==2.2.2
mattermostwrapper==2.1
msgpack-numpy==0.4.1
msgpack-python==0.5.6
murmurhash==0.28.0
networkx==2.1
num2words==0.5.6
numpy==1.14.0
packaging==17.1
pathlib==1.0.1
plac==0.9.6
pocketsphinx==0.1.15
preshed==1.0.0
protobuf==3.6.0
PyAudio==0.2.11
pycparser==2.18
PyHamcrest==1.9.0
PyJWT==1.6.4
pykwalify==1.6.0
pyOpenSSL==18.0.0
pyparsing==2.2.0
pyreadline==2.1
PySocks==1.6.8
python-crfsuite==0.9.5
python-dateutil==2.7.3
python-telegram-bot==10.1.0
pytz==2018.5
PyYAML==3.13
rasa-core==0.9.8
rasa-nlu==0.12.3
redis==2.10.6
regex==2017.4.5
requests==2.18.4
ruamel.yaml==0.15.44
s3transfer==0.1.13
scikit-learn==0.19.1
scipy==1.0.0
semantic-version==2.6.0
simplejson==3.16.0
six==1.11.0
sklearn-crfsuite==0.3.6
slackclient==1.2.1
snips-nlu==0.15.1
snips-nlu-ontology==0.57.1
snips-nlu-utils==0.6.1
spacy==2.0.11
SpeechRecognition==3.8.1
tabulate==0.8.2
tensorboard==1.8.0
tensorflow==1.8.0
termcolor==1.1.0
thinc==6.10.2
toolz==0.9.0
tqdm==4.23.4
twilio==6.14.10
Twisted==18.7.0
typing==3.6.4
tzlocal==1.5.1
ujson==1.35
urllib3==1.22
websocket-client==0.48.0
Werkzeug==0.14.1
wrapt==1.10.11
zope.interface==4.5.0
@reaperhulk
Copy link
Member

Could you create a new virtualenv, pip install pyopenssl requests inside it, and then run python -c "import requests;data = requests.get('https://raw.githubusercontent.com/rc0r/afl-fuzz/master/dictionaries/jpeg.dict');print(data.content)" and see if that works? I did this on a Windows machine just now and it worked fine.

@vaibhavkrishn
Copy link
Author

I tried this but it didn't work, I got the same error.

@reaperhulk
Copy link
Member

Unfortunately, to be able to help further we'll need a way to reproduce it locally.

@alex alex closed this as completed Nov 27, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants