-
Notifications
You must be signed in to change notification settings - Fork 87
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
Error in latest docker image: SELECT id FROM users #69
Comments
Here is the full error: |
I just tried it and this came up. Same error. |
I executed part where it creates db manually, and it started normally after: import sqlite3
def init_db():
conn = sqlite3.connect('users.db')
c = conn.cursor()
c.execute('''CREATE TABLE IF NOT EXISTS users
(id INTEGER PRIMARY KEY, name TEXT)''')
c.execute('''CREATE TABLE IF NOT EXISTS chats
(id INTEGER PRIMARY KEY AUTOINCREMENT,
user_id INTEGER,
role TEXT,
content TEXT,
timestamp DATETIME DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (user_id) REFERENCES users(id))''')
conn.commit()
conn.close()
init_db() |
Thank you! Worked for me |
I am using the docker image, so will this be included in the docker build? |
@zahidhanif it's included, but it doesn't run for some reason. |
to
|
I've mapped the users.db volume in yml and made my own empty db, it worked that way. |
Can you please send me an example? |
Here's the empty users.db (just extract it to root folder of the project): Docker compose I'm using: version: '3.8'
services:
ollama-telegram:
container_name: ollama-telegram
image: ruecat/ollama-telegram
restart: on-failure
env_file:
- ./.env
volumes:
- ./users.db:/code/users.db
ollama-server:
image: ollama/ollama
container_name: ollama-server
volumes:
- ./ollama:/root/.ollama
restart: always
ports:
- '11434:11434' Once started, I had to execute ollama pull on the ollama-server container like this: docker exec -it [container_id] ollama pull llama3.2:1b replace [container_id] with container id from And the .env file looks like this: TOKEN=
ADMIN_IDS=
USER_IDS=
ALLOW_ALL_USERS_IN_GROUPS=1
INITMODEL=llama3.2:1b
TIMEOUT=3000
# UNCOMMENT ONE OF THE FOLLOWING LINES:
# OLLAMA_BASE_URL=localhost # to run ollama without docker, using run.py
OLLAMA_BASE_URL=ollama-server # to run ollama in a docker container
# OLLAMA_BASE_URL=host.docker.internal # to run ollama locally
OLLAMA_HOST=${OLLAMA_BASE_URL}
# Log level
# https://docs.python.org/3/library/logging.html#logging-levels
LOG_LEVEL=DEBUG |
Thanks, that's worked for me |
hm.. i'm still getting this after the latest update: mapping the db-file just change the error message to something like "can't read users.db".. |
@hhenne1 sounds like permission issue to me. Does docker user has rw access to that file? |
oh yea.. im dumb.. my bad, sry.. had a typo in the mount path.. should have realized that docker was mounting an empty folder instead of the file.. |
May be related to the comment I left in d3fb767 |
Unfortunately, the only existing Docker image is tagged |
Hi folks ! I have removed For those like me that use their own ollama server, you have to know that OLLAMA_BASE_URL must contain the IP of your server and not |
I just tried to install this from scratch... I'm still getting the errors:
Has the changes been pushed to docker hub? |
Here is hotfix patch based on @fredix solution. |
fixed issue #69 : sqlite do not init database
I am getting an error with the latest docker image and the logs say it's having problem with running queries such as SELECT id FROM users. The latest docker image was published earlier today
The text was updated successfully, but these errors were encountered: