Pythagora-io / gpt-pilot

The first real AI developer
Other
31.15k stars 3.13k forks source link

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

Open Orxino opened 9 months ago

Orxino commented 9 months ago

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 commented 9 months ago

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

Lilneo786 commented 9 months ago

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.

senko commented 9 months ago

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.

Orxino commented 9 months ago

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

orizehavi97 commented 9 months ago

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

Redenrik commented 9 months ago

i got the same error too in windows 11

joeywpittman commented 9 months ago

same error

Phiapsi commented 9 months ago

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.

orizehavi97 commented 9 months ago

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

Redenrik commented 9 months ago

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)