-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
I've changed line 26 #2201
base: master
Are you sure you want to change the base?
I've changed line 26 #2201
Conversation
I thought it need to be changed because some people (like me) will meet this error when run chatterbot. traceback like: ``` Traceback (most recent call last): File "c:/Users/cccc0/Documents/GitHub/Mieno/MienoBot/DiscordBot.py", line 3, in <module> from ChatterBot import BotCore File "c:\Users\cccc0\Documents\GitHub\Mieno\MienoBot\ChatterBot\BotCore.py", line 6, in <module> Mieno = ChatBot('Mieno') File "C:\Users\cccc0\AppData\Local\Programs\Python\Python37\lib\site-packages\chatterbot\chatterbot.py", line 28, in __init__ self.storage = utils.initialize_class(storage_adapter, **kwargs) File "C:\Users\cccc0\AppData\Local\Programs\Python\Python37\lib\site-packages\chatterbot\utils.py", line 33, in initialize_class return Class(*args, **kwargs) super().__init__(**kwargs) File "C:\Users\cccc0\AppData\Local\Programs\Python\Python37\lib\site-packages\chatterbot\storage\storage_adapter.py", line 21, in __init__ 'tagger_language', languages.ENG File "C:\Users\cccc0\AppData\Local\Programs\Python\Python37\lib\site-packages\chatterbot\tagging.py", line 13, in __init__ self.nlp = spacy.load(self.language.ISO_639_1.lower()) File "C:\Users\cccc0\AppData\Local\Programs\Python\Python37\lib\site-packages\spacy\__init__.py", line 30, in load return util.load_model(name, **overrides) File "C:\Users\cccc0\AppData\Local\Programs\Python\Python37\lib\site-packages\spacy\util.py", line 175, in load_model raise IOError(Errors.E050.format(name=name)) OSError: [E050] Can't find model 'en'. It doesn't seem to be a shortcut link, a Python package or a valid path to a data directory. ```
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code solves a problem I had. It seems to work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here. Replacing line 26 with these lines solves the same issue in using Chatterbot for me.
Before use spacy you need to download base models. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with the changes, could you add a type hint above your changed code so that everyone could understand what the code does.
I thought it need to be changed because some people (like me) will meet this error when run chatterbot.
traceback like: