Chat bot error need help

Question:
Im making a simple chatbot and have everything downloaded but there is a error on line 3

Traceback (most recent call last):
  File "/home/runner/Python/main.py", line 3, in <module>
    from chatterbot.storage.sql_storage import SQLStorageAdapter
ModuleNotFoundError: No module named 'chatterbot.storage.sql_storage'

Current behavior:

Desired behavior

Repl link:

from chatterbot import ChatBot
from chatterbot.trainers import ChatterBotCorpusTrainer
from chatterbot.storage.sql_storage import SQLStorageAdapter

# Create a new chat bot
chatbot = ChatBot(
    'HealthBot',
    storage_adapter=SQLStorageAdapter,
    database_uri='sqlite:///database.db'
)

# Create a new trainer for the chat bot
trainer = ChatterBotCorpusTrainer(chatbot)

# Train the chat bot using the English language data
trainer.train('chatterbot.corpus.english')

Hi @tommythegod21 , welcome to the forums!
Try entering poetry add chatterbot in the Shell to install the module.
Hope this helps!

That’s a typo’d package:

And also they have to already have it installed, it’s the third import that errors:

1 Like

@Firepup650 But wouldn’t

still be part of the main module? This is just a function/class/sub-module of chatterbot?

I’m guessing they’re importing something that doesn’t exist in the package, which causes the error.

1 Like

Hmm… then do you think poetry add chatterbot.storage.sql_storage would work?

No, I do not think that would work

2 Likes

No, since you can’t add internal packages, if they exist, they should come bundled.

1 Like