gpt-pilot icon indicating copy to clipboard operation
gpt-pilot copied to clipboard

[Bug]: Help "peewee.OperationalError: no such table: app"

Open Orxino opened this issue 1 year ago • 10 comments

Version

VisualStudio Code extension

Operating System

Windows 11

What happened?

I wanted to try GPT-Pilot for the first time, and I encountered this error, can someone help me with this please?

"---------- GPT PILOT EXITING WITH ERROR ----------

Traceback (most recent call last):

File "x:\vscodeTady\Orvise\gpt-pilot\pilot-env\Lib\site-packages\peewee.py", line 3251, in execute_sql cursor.execute(sql, params or ())

sqlite3.OperationalError: no such table: app

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "x:\vscodeTady\Orvise/gpt-pilot/pilot/main.py", line 77, in project.start()

File "x:\vscodeTady\Orvise\gpt-pilot\pilot\helpers\Project.py", line 90, in start self.project_manager.get_project_description()

File "x:\vscodeTady\Orvise\gpt-pilot\pilot\helpers\agents\ProductOwner.py", line 27, in get_project_description self.project.app = get_app(self.project.args['app_id'], error_if_not_found=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "x:\vscodeTady\Orvise\gpt-pilot\pilot\database\database.py", line 192, in get_app app = App.get(App.id == app_id) ^^^^^^^^^^^^^^^^^^^^^^^^^

File "x:\vscodeTady\Orvise\gpt-pilot\pilot-env\Lib\site-packages\peewee.py", line 6688, in get return sq.get() ^^^^^^^^

File "x:\vscodeTady\Orvise\gpt-pilot\pilot-env\Lib\site-packages\peewee.py", line 7136, in get return clone.execute(database)[0] ^^^^^^^^^^^^^^^^^^^^^^^

File "x:\vscodeTady\Orvise\gpt-pilot\pilot-env\Lib\site-packages\peewee.py", line 1971, in inner return method(self, database, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "x:\vscodeTady\Orvise\gpt-pilot\pilot-env\Lib\site-packages\peewee.py", line 2042, in execute return self._execute(database) ^^^^^^^^^^^^^^^^^^^^^^^

File "x:\vscodeTady\Orvise\gpt-pilot\pilot-env\Lib\site-packages\peewee.py", line 2215, in _execute cursor = database.execute(self) ^^^^^^^^^^^^^^^^^^^^^^

File "x:\vscodeTady\Orvise\gpt-pilot\pilot-env\Lib\site-packages\peewee.py", line 3259, in execute return self.execute_sql(sql, params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "x:\vscodeTady\Orvise\gpt-pilot\pilot-env\Lib\site-packages\peewee.py", line 3249, in execute_sql with exception_wrapper:

File "x:\vscodeTady\Orvise\gpt-pilot\pilot-env\Lib\site-packages\peewee.py", line 3019, in exit reraise(new_type, new_type(exc_value, *exc_args), traceback)

File "x:\vscodeTady\Orvise\gpt-pilot\pilot-env\Lib\site-packages\peewee.py", line 192, in reraise raise value.with_traceback(tb)

File "x:\vscodeTady\Orvise\gpt-pilot\pilot-env\Lib\site-packages\peewee.py", line 3251, in execute_sql cursor.execute(sql, params or ())

peewee.OperationalError: no such table: app

--------------------------------------------------"

Orxino avatar Dec 24 '23 20:12 Orxino

I tried deleting the "gpt-pilot" file to get Python-env to download again, but it didn't help.

Orxino avatar Dec 24 '23 20:12 Orxino

database table named "app" does not exist or is not accessible in the context of your GPT-Pilot application. To fix this issue, start by checking your application's database setup and configuration. If you're not sure how to proceed, consult the documentation or README file of the GPT-Pilot application you're using, as it should provide guidance on setting up and configuring the database correctly.

Lilneo786 avatar Dec 24 '23 20:12 Lilneo786

I tried deleting the "gpt-pilot" file to get Python-env to download again, but it didn't help.

Try going to the gpt-pilot\pilot directory in the terminal, then activating the Python virtual environment (..\pilot-env\Scripts\activate), and then running: python db_init.py

This should re-initialize the database, and allow you to proceed.

senko avatar Dec 24 '23 21:12 senko

I tried deleting the "gpt-pilot" file to get Python-env to download again, but it didn't help.

Try going to the gpt-pilot\pilot directory in the terminal, then activating the Python virtual environment (..\pilot-env\Scripts\activate), and then running: python db_init.py

This should re-initialize the database, and allow you to proceed.

image

@senko I'm not sure if that's correct. But if it does, it still doesn't work and writes an same error

Orxino avatar Dec 24 '23 21:12 Orxino

Same error for me using the extension. Using main.py works though, that's odd

orizehavi97 avatar Dec 24 '23 22:12 orizehavi97

i got the same error too in windows 11

Redenrik avatar Dec 26 '23 12:12 Redenrik

same error

joeywpittman avatar Dec 26 '23 20:12 joeywpittman

Same error for me using the extension. Using main.py works though, that's odd

I cant do that either. Same error as in VSCode.

Phiapsi avatar Dec 27 '23 07:12 Phiapsi

@Orxino it might be a problem with the port connecting the extension with the core, check if port 8125 is used

orizehavi97 avatar Dec 27 '23 08:12 orizehavi97

I solved it using postgresSQL, not optimal solution but works for now (I had to quickly learn how to use postgresSQL, Chat-GPT helped me)

Redenrik avatar Dec 27 '23 13:12 Redenrik