gunthercox / ChatterBot

ChatterBot is a machine learning, conversational dialog engine for creating chat bots
https://chatterbot.readthedocs.io
BSD 3-Clause "New" or "Revised" License
14.1k stars 4.45k forks source link

error: chatbot object has no attribute train #1598

Closed ggkar closed 5 years ago

ggkar commented 5 years ago

runfile('C:/Users/gnane/OneDrive/Documents/PhD/phd2018 Implementation/GGBot/reflexivemodel.py', wdir='C:/Users/gnane/OneDrive/Documents/PhD/phd2018 Implementation/GGBot') Training the Reflexive Layer [nltk_data] Downloading package averaged_perceptron_tagger to [nltk_data] C:\Users\gnane\AppData\Roaming\nltk_data... [nltk_data] Package averaged_perceptron_tagger is already up-to- [nltk_data] date! [nltk_data] Downloading package punkt to [nltk_data] C:\Users\gnane\AppData\Roaming\nltk_data... [nltk_data] Package punkt is already up-to-date! [nltk_data] Downloading package stopwords to [nltk_data] C:\Users\gnane\AppData\Roaming\nltk_data... [nltk_data] Package stopwords is already up-to-date! Traceback (most recent call last):

File "", line 1, in runfile('C:/Users/gnane/OneDrive/Documents/PhD/phd2018 Implementation/GGBot/reflexivemodel.py', wdir='C:/Users/gnane/OneDrive/Documents/PhD/phd2018 Implementation/GGBot')

File "C:\Users\gnane\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 704, in runfile execfile(filename, namespace)

File "C:\Users\gnane\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 108, in execfile exec(compile(f.read(), filename, 'exec'), namespace)

File "C:/Users/gnane/OneDrive/Documents/PhD/phd2018 Implementation/GGBot/reflexivemodel.py", line 12, in refbot.train(conversation)

AttributeError: 'ChatBot' object has no attribute 'train'

This is the error when I tried installing in my new system and tried to execute my code.

gunthercox commented 5 years ago

Hi @Gnaneswari, the error message you have encountered is correct. The ChatBot object does not have a train attribute.

Could you tell me where you found the instructions that said to call the train method on the ChatBot object? I think there might be a mistake in the documentation and I would like to correct it.

ggkar commented 5 years ago

Thank you. I got it, I had used 0.8.6 version and coded.

lock[bot] commented 4 years ago

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.