AttributeError: 'ChatBot' object has no attribute 'set_trainer'
See original GitHub issueHi, Just after installing ChatterBot ( version is 1.0.0a3.) , I tried to execute the following code snippet from quick start guide:
from chatterbot import ChatBot
chatbot = ChatBot("Ron Obvious")
from chatterbot.trainers import ListTrainer
conversation = [
"Hello",
"Hi there!",
"How are you doing?",
"I'm doing great.",
"That is good to hear",
"Thank you.",
"You're welcome."
]
chatbot.set_trainer(ListTrainer)
chatbot.train(conversation)
It failed to execute with the error, " AttributeError: ‘ChatBot’ object has no attribute ‘set_trainer’ ". I couldn’t find any other post related to this attribute either. I skimmed through the code of chatterbot.py and found ChatBot indeed has neither ‘set_trainer’ nor ‘train’ function. Am I missing something here? I would really appreciate if anybody could help me here. Thanks,
Issue Analytics
- State:
- Created 5 years ago
- Reactions:6
- Comments:18 (5 by maintainers)
Top Results From Across the Web
AttributeError: 'ChatBot' object has no attribute 'set_trainer'
I had this problem until I rearranged placing of the set_trainer statement, as in my code here: from chatterbot import ChatBot from ...
Read more >chatterbot/Lobby - Gitter
I am getting this error AttributeError: 'ChatBot' object has no attribute 'find'. Code: from chatterbot import ChatBot chatbot = ChatBot("Ron Obvious")
Read more >AttributeError: 'ChatBot' object has no attribute 'set_trainer' - GUJ
coding: utf-8 * from chatterbot.trainers import ListTrainer from chatterbot import ChatBot import os bot = ChatBot('BORIS') bot ...
Read more >AttributeError: 'ChatBot' object has no attribute 'set_trainer' | by Neha ...
can any one help me in resolving this issue. “AttributeError: 'ChatBot' object has no attribute 'set_trainer'” is published by Neha Firdous.
Read more >Trying To Run Chatbot On Discord But Get Attributeerror - ADocLib
It failed to execute with the error AttributeError: 'ChatBot' object has no attribute 'settrainer'.I couldn't find any other post related to this.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @Chingcham, make sure you are viewing the
latest
version of the documentation for 1.0.0a3. The default (stable
) will be for version 0.8.https://chatterbot.readthedocs.io/en/latest/quickstart.html#training-your-chatbot
hi bro
i am also same issue facing but fix this error
please following solve error steps: Flask==0.12.3 chatterbot==0.8.4 SQLAlchemy==1.1.11
install same version packages
issue is solved …