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

SSLError "Bad Handshake" error during python -m snips_nlu download-language-entities en #905

Open
SamChadri opened this issue Apr 27, 2022 · 4 comments
Labels

Comments

@SamChadri
Copy link

The Bug
I seem to be getting a bad handshake error while trying to download the built-in entities.
SLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],)"),))

To Reproduce
The error comes up when trying to parse input, and then an error occurs saying
"FileNotFoundError: No data found for the 'snips/city' builtin entity in language 'en'. You must download the corresponding resources by running 'python -m snips_nlu download-entity snips/city en' before you can use this built-in entity."

Then when trying to download the SSL Bad Handshake error occurs

If successful, the command should download and link the built-in entities, but I see no documentation about it and very little help online.

Environment:

  • OS: Mac OSX
  • Python version: 3.6.10 :: Anaconda, Inc.
  • snips-nlu version: 0.20.2
@SamChadri SamChadri added the bug label Apr 27, 2022
@jbroeckling
Copy link

seems like some protocol from "resources.snips.ai" is expired. Is there a way someone could fresh that up ?

@rtkay123
Copy link

Any luck here? I also need the other entities :(

@jbroeckling
Copy link

jbroeckling commented Jul 21, 2022

Any luck here? I also need the other entities :(

so I made following UNSAFE steps to get those:

  1. go to the installed Snips Folder, e.g venv/lib/python3.9/site-packages/snips_nlu/cli/ and here you want to change the utils.py. In the "get_json" function you can change
    r = requests.get(url) int r = requests.get(url, verify= False)

This tells request it should ignore false and expired protocols. THIS IS PROBABLY UNSAFE. It can be used for attacks or what so ever.

  1. The second step for downloading the resources is telling pip that the unsafe protocol is okay. I did that with following command:

pip config set global.trusted-host "resources.snips.ai" --trusted-host=https://resources.snips.ai/

  1. After that the known command to download the ressources should work.

These things are very likely to be UNSAFE!!! and to update the protocol should be done.

@rtkay123
Copy link

Any luck here? I also need the other entities :(

so I made following UNSAFE steps to get those:

1. go to the installed Snips Folder, e.g venv/lib/python3.9/site-packages/snips_nlu/cli/  and here you want to change the utils.py. In the "get_json" function you can change
   r = requests.get(url) int r = requests.get(url, verify= False)

This tells request it should ignore false and expired protocols. THIS IS PROBABLY UNSAFE. It can be used for attacks or what so ever.

2. The second step for downloading the resources is telling pip that the unsafe protocol is okay. I did that with following command:

pip config set global.trusted-host "resources.snips.ai" --trusted-host=https://resources.snips.ai/

3. After that the known command to download the ressources should work.

These things are very likely to be UNSAFE!!! and to update the protocol should be done.

Thanks

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

No branches or pull requests

3 participants