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

Using 'make models' can not create 'API' database #60

Open
maiduchuy321 opened this issue Nov 21, 2023 · 2 comments
Open

Using 'make models' can not create 'API' database #60

maiduchuy321 opened this issue Nov 21, 2023 · 2 comments

Comments

@maiduchuy321
Copy link

FATAL: database "api" does not exist
Hi,
I have a problem when install RasaGPT == make models. I using window 11
When i using make models Terminal error message:
sqlalchemy.exc.ArgumentError: Textual SQL expression 'CREATE EXTENSION IF NOT E...' should be explicitly declared as text('CREATE EXTENSION IF NOT E...')
Therefore
I fix it I fix it by change ' query = "CREATE EXTENSION IF NOT EXISTS vector;" ' in line 619 file models.py to query = text("CREATE EXTENSION IF NOT EXISTS vector;") and add sqlalchemy import text.
But when i using make models again, another bug found:
sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "db" (172.30.0.6), port 5432 failed: FATAL: database "api" does not exist

And i have no ideas to fix it.
If you no please help me !!!
Many thanks.

@maiduchuy321 maiduchuy321 changed the title Can not create 'API' database Using 'make models' can not create 'API' database Nov 21, 2023
@fermion2020
Copy link

Howdy. I'm not a developer, but I had the same issue.
You should go to the database container make shell-db and run this script /docker-entrypoint-initdb.d/create_db.sh
It will create the database. Also you should change all queries in model.py by adding text conversion of each.

@agoodfellow123
Copy link

Howdy. I'm not a developer, but I had the same issue. You should go to the database container make shell-db and run this script /docker-entrypoint-initdb.d/create_db.sh It will create the database. Also you should change all queries in model.py by adding text conversion of each.

Can you explain this further, I'm new to docker, and when I try to make shell-db , I get the container chat-db not running error, when I try to run the container I get the container not exists error. Please write all the commands to here you wrote on your system.

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

3 participants