ChatterBot: Error during Mongo adapter statement serialization
Hey, after I started using the mongodb storage adapter, I keep getting this error:
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/discord/ext/commands/bot.py", line 247, in _run_extra
yield from coro(*args, **kwargs)
File "./mods/AI.py", line 47, in on_message
msg = "**{0}**\n".format(message.author.name)+str(chatbot.get_response(message.content))
File "/usr/local/lib/python3.5/dist-packages/chatterbot/chatterbot.py", line 149, in get_response
self.storage.update(input_statement)
File "/usr/local/lib/python3.5/dist-packages/chatterbot/adapters/storage/mongodb.py", line 126, in update
data = statement.serialize()
File "/usr/local/lib/python3.5/dist-packages/chatterbot/conversation/statement.py", line 80, in serialize
data["in_response_to"].append(response.serialize())
File "/usr/local/lib/python3.5/dist-packages/chatterbot/conversation/statement.py", line 80, in serialize
data["in_response_to"].append(response.serialize())
AttributeError: 'dict' object has no attribute 'serialize'
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 22 (9 by maintainers)
Oh sorry, forgot to respond. After updating again with your new commits a few days later, I haven’t received the error again. Everything seems well at this point and it’s fast. Thanks for keeping in check and continuing development of this project!
yeah, that’s what I was thinking. I’ll try it when I get home, thanks.
You could specify a different database name and your old data would be safe while you test your theory.
Alright, thank you. I will see if I can track down where this is happening.
It seems as I was on the latest version, 0.4.3 but I’ve went ahead and uninstalled pip and installed from source. Hope the issue is fixed, closed for now.