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

ClosestMeaningAdapter nltk_data download loop #350

Closed
Nixellion opened this issue Oct 16, 2016 · 5 comments
Closed

ClosestMeaningAdapter nltk_data download loop #350

Nixellion opened this issue Oct 16, 2016 · 5 comments

Comments

@Nixellion
Copy link

Whenever I try to use ClosestMeaningAdapter, it goes into download loop like this:

[nltk_data]     C:\Users\nixes\AppData\Roaming\nltk_data...
[nltk_data]   Package punkt is already up-to-date!
[nltk_data] Downloading package stopwords to
[nltk_data]     C:\Users\nixes\AppData\Roaming\nltk_data...
[nltk_data]   Package stopwords is already up-to-date!
[nltk_data] Downloading package wordnet to
[nltk_data]     C:\Users\nixes\AppData\Roaming\nltk_data...
[nltk_data]   Package wordnet is already up-to-date!
[nltk_data] Downloading package punkt to
[nltk_data]     C:\Users\nixes\AppData\Roaming\nltk_data...
[nltk_data]   Package punkt is already up-to-date!
[nltk_data] Downloading package stopwords to
[nltk_data]     C:\Users\nixes\AppData\Roaming\nltk_data...
[nltk_data]   Package stopwords is already up-to-date!
[nltk_data] Downloading package wordnet to
[nltk_data]     C:\Users\nixes\AppData\Roaming\nltk_data...
[nltk_data]   Package wordnet is already up-to-date!
[nltk_data] Downloading package punkt to
[nltk_data]     C:\Users\nixes\AppData\Roaming\nltk_data...
[nltk_data]   Package punkt is already up-to-date!
[nltk_data] Downloading package stopwords to
[nltk_data]     C:\Users\nixes\AppData\Roaming\nltk_data...
[nltk_data]   Package stopwords is already up-to-date!
[nltk_data] Downloading package wordnet to
[nltk_data]     C:\Users\nixes\AppData\Roaming\nltk_data...
[nltk_data]   Package wordnet is already up-to-date!

However nltk is downloaded. Is it me, or is there a bug?

@gunthercox
Copy link
Owner

I've seen this before, but it appears to be somewhat sporadic. Occasionally data files will be downloaded for NLTK even when they have already been downloaded. I will look into the issue.

@Nixellion
Copy link
Author

Thanks. Happens all the time here :(

@vkosuri
Copy link
Collaborator

vkosuri commented Oct 30, 2016

I believe you were seeing this looping message due to https://github.com/gunthercox/ChatterBot/blob/master/chatterbot/utils/wordnet.py#L18

Usually we don't have privileges default nltk download directories, obviously We will get LookupError Exception,

And also the expected default directories are /home/<user/nltk on Linux, C:\Users\<user>\AppData\Roaming\nltk_data on Windows

if sys.platform.startswith('win'):
    # Common locations on Windows:
    path += [
        str(r'C:\nltk_data'), str(r'D:\nltk_data'), str(r'E:\nltk_data'),
        os.path.join(sys.prefix, str('nltk_data')),
        os.path.join(sys.prefix, str('lib'), str('nltk_data')),
        os.path.join(
            os.environ.get(str('APPDATA'), str('C:\\')), str('nltk_data'))
    ]
else:
    # Common locations on UNIX & OS X:
    path += [
        str('/usr/share/nltk_data'),
        str('/usr/local/share/nltk_data'),
        str('/usr/lib/nltk_data'),
        str('/usr/local/lib/nltk_data')
    ]

vkosuri pushed a commit to vkosuri/ChatterBot that referenced this issue Oct 30, 2016
This was referenced Oct 30, 2016
@gunthercox
Copy link
Owner

This should be resolved by #369

@lock
Copy link

lock bot commented Mar 10, 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 Mar 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants