Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StrogeAdapter problems #2127

Open
ahmet-soner opened this issue Feb 20, 2021 · 10 comments
Open

StrogeAdapter problems #2127

ahmet-soner opened this issue Feb 20, 2021 · 10 comments

Comments

@ahmet-soner
Copy link

Traceback (most recent call last):
File "C:\Users\MYSTIC\Desktop\chatterbot\ChatBot.py", line 1, in
from chatterbot import ChatBot
File "C:\Users\MYSTIC\Desktop\chatterbot\chatterbot.py", line 2, in
from chatterbot.storage import StorageAdapter
ModuleNotFoundError: No module named 'chatterbot.storage'; 'chatterbot' is not a package


What is the solution ?

@intercontoni
Copy link

intercontoni commented Feb 21, 2021

Tray this...

from chatterbot import ChatBot
from chatterbot.trainers import ListTrainer
from chatterbot.trainers import ChatterBotCorpusTrainer

Your code say.... chatterbot.storage????

chatterbot.storage'; 'chatterbot' is not a package....

@ahmet-soner
Copy link
Author

ahmet-soner commented Feb 21, 2021 via email

@intercontoni
Copy link

Oh.... I see your problem...

Not is ChaBot.py .... is chabot.py

on the Application root.

It is a physical address to your application on a server that corresponds with its URI.

Put the chatbot.py here

1 similar comment
@intercontoni
Copy link

Oh.... I see your problem...

Not is ChaBot.py .... is chabot.py

on the Application root.

It is a physical address to your application on a server that corresponds with its URI.

Put the chatbot.py here

@intercontoni
Copy link

line 1, in
from chatterbot import ChatBot

This is good...

And you need to put chaterbot.py in C:\Users\MYSTIC\Desktop\chatterbot\chatboy.py

Remember.... ChatBot.py not work... work chatbot.py

ChatBot.py is a file in the folder inside ir the site-packages

Let me know bro...

@ahmet-soner
Copy link
Author

ahmet-soner commented Feb 21, 2021 via email

@intercontoni
Copy link

I used hosting linux share vps...
i don't know what do you used...

Do you have installed chatterbot?

Used pip freeze and see the list...

If not have used

python -m pip install chatterbot

Hummm do you have ...

C:\Users\MYSTIC\Desktop\chatterbot\chatboy.py

chatboy ??

What is a code for chatboy.py ???

Le me see...

C:\Users\MYSTIC\Desktop\chatterbot\chatterbot.py

What is a code inside the chatterbot.py ???

Le me see...

I used all in one file .py .... the name app.py

This is a code I am have...

import os
import sys
from flask import Flask, render_template, request
from sys import version
from chatterbot import ChatBot
from chatterbot.trainers import ChatterBotCorpusTrainer
from chatterbot.trainers import ListTrainer

sys.path.insert(0, os.path.dirname(__file__))

app = Flask(__name__)

chatbot = ChatBot('Toni', storage_adapter='chatterbot.storage.SQLStorageAdapter',
database_uri='sqlite:///database.sqlite3')

trainer = (ListTrainer)
trainer = ChatterBotCorpusTrainer(chatbot)

trainer.train("chatterbot.corpus.english")

@app.route("/")
def home():    
    return render_template("elultimo.html") 
    
@app.route("/get")
def get_bot_response():    
    userText = request.args.get('msg')    
    return str(bot.get_response(userText)) 
    
if __name__ == "__main__":
     app.run()

My chatterbot is the name Toni and the folder root is the name toni

in ssh work... but I have problem in the page... not response https://intercongreso.vps.co.ve/toni

I am invertigate what happen... if you used my app.py and work for you let me know please.. I don't have computer... for used localhost in my computer...

I work whit my Phone :)

Good look...

@intercontoni
Copy link

intercontoni commented Feb 21, 2021

I used hosting linux share vps...
i don't know what do you used...

Do you have installed chatterbot?

Used pip freeze and see the list...

If not have used

python -m pip install chatterbot

Hummm do you have ...

C:\Users\MYSTIC\Desktop\chatterbot\chatboy.py

chatboy ??

What is a code for chatboy.py ???

Le me see...

C:\Users\MYSTIC\Desktop\chatterbot\chatterbot.py

What is a code inside the chatterbot.py ???

Le me see...

I used all in one file .py .... the name app.py

This is a code I am have...

import os
import sys
from flask import Flask, render_template, request
from sys import version
from chatterbot import ChatBot
from chatterbot.trainers import ChatterBotCorpusTrainer
from chatterbot.trainers import ListTrainer

sys.path.insert(0, os.path.dirname(__file__))

app = Flask(__name__)

chatbot = ChatBot('Toni', storage_adapter='chatterbot.storage.SQLStorageAdapter',
database_uri='sqlite:///database.sqlite3')

trainer = ListTrainer(chatbot)
trainer = ChatterBotCorpusTrainer(chatbot)

trainer.train("chatterbot.corpus.english")

@app.route("/")
def home():    
    return render_template("index.html") 
    
@app.route("/get")
def get_bot_response():    
    userText = request.args.get('msg')    
    return str(bot.get_response(userText)) 
    
if __name__ == "__main__":
     app.run()

My chatterbot is the name Toni and the folder root is the name toni

in ssh work... but I have problem in the page... not response https://intercongreso.vps.co.ve/toni

I am investigate what happen... if you used my app.py and work for you let me know please.. I don't have computer... for used localhost in my computer...

I work whit my Phone :)

Well... I used extradata whit this code but I delete in the app.py for you.

training_data_quesans = open('training_data/ques_ans.txt').read().splitlines()
training_data_personal = open('training_data/personal_ques.txt').read().splitlines()

training_data = training_data_quesans + training_data_personal

trainer.train(training_data)

If you what used extradata ley me know how used this...

First tray funcional regular your chatterbot...

Good look...

@ahmet-soner
Copy link
Author

ahmet-soner commented Feb 21, 2021 via email

@intercontoni
Copy link

Whatsapp üzerinden konuşmayı deneyelim

Lütfen https://intercongreso.vps.co.ve adresine gidin

sayfanın altında whatsapp göreceksiniz ... aşağıda ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants