You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When setting this project up, and following the documentation under the How to start using gpt-pilot? section, the documentation at step number 8 mentions setting up the environment variable in the .env file.
Here it mentions the following:
to change from SQLite to PostgreSQL in your .env just set DATABASE_TYPE=postgres
But this results in an error:
Traceback (most recent call last):
File "/home/ramkrishna/Documents/experiments/gpt-pilot/pilot/db_init.py", line 5, in <module>
drop_tables()
File "/home/ramkrishna/Documents/experiments/gpt-pilot/pilot/database/database.py", line 385, in drop_tables
raise ValueError(f"Unsupported DATABASE_TYPE: {DATABASE_TYPE}")
ValueError: Unsupported DATABASE_TYPE: postgres
The error seems to be due to this check in pilot/database/database.py:380
if DATABASE_TYPE == "postgresql":
sql = f'DROP TABLE IF EXISTS "{table._meta.table_name}"'
elif DATABASE_TYPE == "sqlite":
sql = f'DROP TABLE IF EXISTS "{table._meta.table_name}"'
else:
raise ValueError(f"Unsupported DATABASE_TYPE: {DATABASE_TYPE}")
The correct check should be:
if DATABASE_TYPE == "postgres":
sql = f'DROP TABLE IF EXISTS "{table._meta.table_name}"'
elif DATABASE_TYPE == "sqlite":
sql = f'DROP TABLE IF EXISTS "{table._meta.table_name}"'
else:
raise ValueError(f"Unsupported DATABASE_TYPE: {DATABASE_TYPE}")
The text was updated successfully, but these errors were encountered:
When setting this project up, and following the documentation under the
How to start using gpt-pilot?
section, the documentation at step number 8 mentions setting up the environment variable in the.env
file.Here it mentions the following:
But this results in an error:
The error seems to be due to this check in
pilot/database/database.py:380
The correct check should be:
The text was updated successfully, but these errors were encountered: