error during training the chatbot in chatterbot

63 Views Asked by At

this are my codes

from chatterbot import ChatBot from chatterbot.trainers import ListTrainer import spacy

nlp=spacy.load("en_core_web_sm")

bot = ChatBot("chatbot", read_only=False, logic_adapters=["chatterbot.logic.BestMatch"])

list=[ "hi", "hi there", "what your name", "chatbot", "how old", "age less!" ]

list_trainer=ListTrainer(bot)

list_trainer.train(list)

but this error occur

PS C:\Users\Timoth\Desktop\chatbot> & 'C:\Users\Timoth\AppData\Local\Programs\Python\Python311\python.exe' 'c:\Users\Timoth.vscode\extensions\ms-python.python-2023.18.0\pythonFiles\lib\python\debugpy\adapter/../..\debugpy\launcher' '49893' '--' 'c:\Users\Timoth\Desktop\chatbot\index.py' Traceback (most recent call last): File "c:\Users\Timoth\Desktop\chatbot\index.py", line 5, in bot = ChatBot("chatbot", read_only=False, logic_adapters=["chatterbot.logic.BestMatch"]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Timoth\AppData\Local\Programs\Python\Python311\Lib\site-packages\chatterbot-1.1.0a7-py3.11.egg\chatterbot\chatterbot.py", line 28, in init
File "C:\Users\Timoth\AppData\Local\Programs\Python\Python311\Lib\site-packages\chatterbot-1.1.0a7-py3.11.egg\chatterbot\utils.py", line 33, in initialize_class
File "C:\Users\Timoth\AppData\Local\Programs\Python\Python311\Lib\site-packages\chatterbot-1.1.0a7-py3.11.egg\chatterbot\storage\sql_storage.py", line 20, in init File "C:\Users\Timoth\AppData\Local\Programs\Python\Python311\Lib\site-packages\chatterbot-1.1.0a7-py3.11.egg\chatterbot\storage\storage_adapter.py", line 22, in init File "C:\Users\Timoth\AppData\Local\Programs\Python\Python311\Lib\site-packages\chatterbot-1.1.0a7-py3.11.egg\chatterbot\tagging.py", line 26, in init File "C:\Users\Timoth\AppData\Local\Programs\Python\Python311\Lib\site-packages\spacy_init_.py", line 51, in load return util.load_model( ^^^^^^^^^^^^^^^^ File "C:\Users\Timoth\AppData\Local\Programs\Python\Python311\Lib\site-packages\spacy\util.py", line 471, in load_model from a shortcut, which is obsolete as of spaCy v3.0. To load the model, use its full name instead:

nlp = spacy.load("en_core_web_sm")

For more details on the available models, see the models directory: https://spacy.io/models and if you want to create a blank model, use spacy.blank: nlp = spacy.blank("en")

I exoected the bot to be trained

0

There are 0 best solutions below