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.01k stars 4.43k forks source link

sqlite3.ProgrammingError #1903

Open balzer82 opened 4 years ago

balzer82 commented 4 years ago

I am using the SQLStorageAdapter and after some time I get this error:

sqlite3.ProgrammingError: SQLite objects created in a thread can only be used in that same thread. The object was created in thread id 140401660413696 and this is thread id 140401742112576.

chatterbot==1.0.5

Macilias commented 4 years ago

Same here

xicoin commented 3 years ago

Same issue here... :(

intercontoni commented 3 years ago

Sorry... but I need help... I am new in programation and my e nglish is bad...

I have this chatterbot and flask... ssh flask run is ok 100%... python app.py is ok in ssh... 100%

How to see in my hosting ???

When I go to the page I see the passager_wsgi.py and not app.py... No my template... No my html in template...

This is my passanger_wsgi.py

import os

from flask import Flask, request, render_template, redirect, url_for

project_root = os.path.dirname(os.path.realpath('file')) template_path = os.path.join(project_root, 'app/templates') static_path = os.path.join(project_root, 'app/static') app = Flask(name, template_folder=template_path, static_folder=static_path)

@app.route('/')

def index(): return 'Hello from flask'

application = app

And this is my app.py... (I test many configuración in there)

from flask import Flask, render_template, request from chatterbot import ChatBot from chatterbot.trainers import ChatterBotCorpusTrainer

chatbot = ChatBot('Ron Obvious')

Create a new trainer for the chatbot

trainer = ChatterBotCorpusTrainer(chatbot)

Train the chatbot based on the english corpus

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

Train the chatbot based on the spanish corpus

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

Get a response to an input statement

chatbot.get_response("Hello, how are you today?")

app = Flask(name,template_folder='templates') #Nueva configuraci贸n

@app.route('/') def index(): return render_template('home.html')

if name == "main": app.run(debug=True)

The hosting is shared vps and all ports is ni work... is closed... and when I go to use IP:5000 the IP is clased to...... the chatterbot suposly is here...

https://intercongreso.vps.co.ve/interbot

Is in mode development...

I need put in production mode for work?

Thanks for help... and sorry por all