Error using chatterbot in python ('chatterbot' is not a package)

-2

I made a basic Chatterbot code in Python that worked fine, but out of nowhere it stopped working and always has the same error:

  

from chatterbot.trainers import ListTrainer ModuleNotFoundError: No module named 'chatterbot.trainers'; 'chatterbot' is not a package

Please, can anyone help me?

    
asked by anonymous 28.12.2018 / 19:17

1 answer

1

This problem has already been reported and resolved in StackOverflow (gringo) .

This may be caused by the fact that this file you are running, or some other file that is in the same directory, has the same module name. So, it will cause this error, because, as it says in the statement: 'chatterbot' is not a package .

In short: change the name of the chatterbot file to another name.

However, if this does not stop the errors against the module, then, as @Anderson said, you should make sure you have the chatterbot installed.

I hope I have helped!

    
28.12.2018 / 19:30