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.11k stars 4.44k forks source link

I get ModuleNotFoundError when I try setting a custom preprocessor to my settings.py file #2365

Open ssebastian90 opened 7 months ago

ssebastian90 commented 7 months ago

I try to set a custom preprocessor "custom_lowercase_preprocessor" from module "custom_preprocessors" that is located in the same directory with the settingspy file and I get a ModuleNotFoundError No module named 'custom_preprocessors'. Could anyone help with some pointers for I can't see where the problem is .

This is my full Chatterbot settings.

CHATTERBOT = { 'name': 'Chatbot', 'django_app_name': 'django_chatterbot', 'preprocessors': [ 'chatterbot.preprocessors.clean_whitespace', 'custom_preprocessors.custom_lowercase_preprocessor', ], 'logic_adapters': [ { 'import_path': 'chatterbot.logic.BestMatch', 'default_response': 'Sorry but I have no answer.', 'maximum_similarity_threshold': 0.00, 'statement_comparison_function': LevenshteinDistance, }, 'chatterbot.logic.TimeLogicAdapter', ], }