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

NLTK SSL Errors loading... #930

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

Comments

@sedemmler
Copy link

commented Aug 14, 2017

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

This comment has been minimized.

Copy link
Collaborator

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

This comment has been minimized.

Copy link
Author

commented Aug 14, 2017

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

@gunthercox

This comment has been minimized.

Copy link
Owner

commented Sep 29, 2017

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.

@gunthercox gunthercox closed this Sep 29, 2017

@QUDUSKUNLE

This comment has been minimized.

Copy link

commented May 11, 2018

@vkosuri Thanks a lot.

@lock

This comment has been minimized.

Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
4 participants
You can’t perform that action at this time.