Skip to content
New issue

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

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

Already on GitHub? # to your account

NLTK SSL Errors loading... #930

Closed
sedemmler opened this issue Aug 14, 2017 · 5 comments
Closed

NLTK SSL Errors loading... #930

sedemmler opened this issue Aug 14, 2017 · 5 comments

Comments

@sedemmler
Copy link

I didn't see this directly addressed earlier, but please correct me if I missed it.

I'm receiving these NLTK related errors when running ChatBot (but no issues when I'm coding up NLTK separately on another project.

Any guidance would be wonderful. Thanks guys.

[nltk_data] Error loading stopwords: <urlopen error [SSL:
[nltk_data]     CERTIFICATE_VERIFY_FAILED] certificate verify failed
[nltk_data]     (_ssl.c:749)>
[nltk_data] Error loading wordnet: <urlopen error [SSL:
[nltk_data]     CERTIFICATE_VERIFY_FAILED] certificate verify failed
[nltk_data]     (_ssl.c:749)>
[nltk_data] Error loading punkt: <urlopen error [SSL:
[nltk_data]     CERTIFICATE_VERIFY_FAILED] certificate verify failed
[nltk_data]     (_ssl.c:749)>
[nltk_data] Error loading vader_lexicon: <urlopen error [SSL:
[nltk_data]     CERTIFICATE_VERIFY_FAILED] certificate verify failed
[nltk_data]     (_ssl.c:749)>
@vkosuri
Copy link
Collaborator

vkosuri commented Aug 14, 2017

@sedemmler I don't see any issues on my machine hp pro-book 440 g3

I googled your issue found some answer, i think this could help solve your problem

https://stackoverflow.com/a/41692664/358458
https://stackoverflow.com/a/39142816/358458

However the post suggested workaround related to SSL , i am not sure how this will effect on other platforms? @gunthercox any comments?

import nltk
import ssl

try:
    _create_unverified_https_context = ssl._create_unverified_context
except AttributeError:
    pass
else:
    ssl._create_default_https_context = _create_unverified_https_context

nltk.download()

@sedemmler
Copy link
Author

I appreciate you taking a look. Let me give your suggestion ago tomorrow and I'll let you know how it goes. Thanks!

@gunthercox
Copy link
Owner

I'm going to close this ticket off because it hasn't been reported again. I'm assuming it could have possibly been a temporary error on the side of the servers hosting NLTK's data.

@QUDUSKUNLE
Copy link

@vkosuri Thanks a lot.

@lock
Copy link

lock bot commented May 11, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators May 11, 2019
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants