So I was trying to use the python chatterbot library to make a simple chatbot, I got a couple errors but after searching I was able to take care of them, but now I get this error and I dont know how to take care of it, im using the latest version of Chatterbot which is 1.2.2, and python 3.12.3, here's my code:
from chatterbot import ChatBot
from chatterbot.trainers import ChatterBotCorpusTrainer
chatbot = ChatBot("Nugget")
trainer = ChatterBotCorpusTrainer("Nuggeto")
trainer.train("chatterbot.corpus.english")
chatbot.get_response("Hello! How are you doing today?")
< /code>
Error: ChatterBot Corpus Trainer: 0it [00:00, ?it/s]
Traceback (most recent call last):
File "c:\Users\Nugget\Documents\Python\chatbot.py", line 7, in
trainer.train("chatterbot.corpus.english")
File "C:\Users\محمد\AppData\Local\Programs\Python\Python312\Lib\site-packages\chatterbot\trainers.py", line 146, in train
documents = self.chatbot.tagger.as_nlp_pipeline(conversation)
^^^^^^^^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'tagger'
< /code>
I also installed the chatterbot corpus, and please ignore the username, had to edit this a lot, sorry
it just give str object has no tagger attribute in one of the py files of ChatBot, I even tried maybe installing ChatBot itself, still didnt work
Python Chatterbot, STR -Objekt hat keinen Attribut -Tagger [geschlossen] ⇐ Python
-
- Similar Topics
- Replies
- Views
- Last post