0
Whenever I run the following code (using python)
from chatterbot import ChatBot
from chatterbot.trainers import ListTrainer
bot = ChatBot('bot1')
bot = ChatBot(
'bot1',
storage_adapter='chatterbot.storage.SQLStorageAdapter',
database_uri='sqlite:///database.sqlite3'
)
conversa = ListTrainer(bot)
conversa.train([
'Olá',
'Oi',
'Qual o seu nome?',
'bot1',
'Prazer em te conhecer',
'Igualmente',
])
while True:
try:
resposta = bot.get_response(input("Usuário: "))
if float(resposta.confidence) > 0.5:
print("bot1: ", resposta)
else:
print("Eu não entendi :(")
except(KeyboardInterrupt, EOFError, SystemExit):
break
I get this error message
Traceback (most recent call last):
File "C:\Users\Gabriel\PycharmProjects\guppe\bot1\python3 bot.py", line 4, in <module>
bot = ChatBot('bot1')
File "C:\Users\Gabriel\AppData\Local\Programs\Python\Python39\lib\site-packages\chatterbot-1.1.0-py3.9.egg\chatterbot\chatterbot.py", line 28, in __init__
File "C:\Users\Gabriel\AppData\Local\Programs\Python\Python39\lib\site-packages\chatterbot-1.1.0-py3.9.egg\chatterbot\utils.py", line 33, in initialize_class
File "C:\Users\Gabriel\AppData\Local\Programs\Python\Python39\lib\site-packages\chatterbot-1.1.0-py3.9.egg\chatterbot\storage\sql_storage.py", line 22, in __init__
File "C:\Users\Gabriel\AppData\Local\Programs\Python\Python39\lib\site-packages\sqlalchemy\__init__.py", line 8, in <module>
from . import util as _util # noqa
File "C:\Users\Gabriel\AppData\Local\Programs\Python\Python39\lib\site-packages\sqlalchemy\util\__init__.py", line 14, in <module>
from ._collections import coerce_generator_arg # noqa
File "C:\Users\Gabriel\AppData\Local\Programs\Python\Python39\lib\site-packages\sqlalchemy\util\_collections.py", line 16, in <module>
from .compat import binary_types
File "C:\Users\Gabriel\AppData\Local\Programs\Python\Python39\lib\site-packages\sqlalchemy\util\compat.py", line 264, in <module>
time_func = time.clock
AttributeError: module 'time' has no attribute 'clock'
Process finished with exit code 1
Does anyone know what it can be?