ChatterBot
ChatterBot copied to clipboard
I get an attribute error when trying to run
I get this error
Traceback (most recent call last):
File "c.py", line 4, in <module>
chatbot = ChatBot('Ron Obvious')
File "C:\Users\K I N G\AppData\Local\Programs\Python\Python38\lib\site-packages\chatterbot\chatterbot.py", line 35, in __init__
self.storage = utils.initialize_class(storage_adapter, **kwargs)
File "C:\Users\K I N G\AppData\Local\Programs\Python\Python38\lib\site-packages\chatterbot\utils.py", line 54, in initialize_class
return Class(*args, **kwargs)
File "C:\Users\K I N G\AppData\Local\Programs\Python\Python38\lib\site-packages\chatterbot\storage\sql_storage.py", line 22, in __init__ from sqlalchemy import create_engine
File "C:\Users\K I N G\AppData\Local\Programs\Python\Python38\lib\site-packages\sqlalchemy\__init__.py", line 8, in <module>
from . import util as _util # noqa
File "C:\Users\K I N G\AppData\Local\Programs\Python\Python38\lib\site-packages\sqlalchemy\util\__init__.py", line 14, in <module>
from ._collections import coerce_generator_arg # noqa
File "C:\Users\K I N G\AppData\Local\Programs\Python\Python38\lib\site-packages\sqlalchemy\util\_collections.py", line 16, in <module>
from .compat import binary_types
File "C:\Users\K I N G\AppData\Local\Programs\Python\Python38\lib\site-packages\sqlalchemy\util\compat.py", line 264, in <module>
time_func = time.clock
AttributeError: module 'time' has no attribute 'clock'
when trying to run. That's my code
from chatterbot import ChatBot
from chatterbot.trainers import ChatterBotCorpusTrainer
chatbot = ChatBot('Ron Obvious')
trainer = ChatterBotCorpusTrainer(chatbot)
trainer.train("chatterbot.corpus.english")
res = chatbot.get_response("Hello")
print(res)
Duplicate of https://github.com/gunthercox/ChatterBot/issues/2159
Boa tarde.
utilize o pip install --upgrade sqlalchemy.
When you upgraded chatterbot did you get a error? When debugging as I'm noticing the output from the majority of individuals who have downgraded their chatterbot.It seems to be a output of error from downgrading.
In addition, to this which IDE is being used to to develop this Chatterbot?