GPTeam
GPTeam copied to clipboard
Supabase db-reset command in setup.py fails
I re-cloned the repo and set up my openai api key + supabase credentials, but when running the python setup.py
command I keep running into this issue:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Users/mohayat/projects/GPTeam/src/utils/database/reset.py", line 31, in main
asyncio.run(reset())
File "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/runners.py", line 190, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/Users/mohayat/projects/GPTeam/src/utils/database/reset.py", line 17, in reset
subprocess.run(["supabase", "db", "reset"])
File "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 548, in run
with Popen(*popenargs, **kwargs) as process:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 1024, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 1917, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'supabase'
Traceback (most recent call last):
File "/Users/mohayat/projects/GPTeam/setup.py", line 66, in <module>
subprocess.run(["poetry", "run", "db-reset"], check=True)
File "/Users/mohayat/.pyenv/versions/3.11.0/lib/python3.11/subprocess.py", line 569, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['poetry', 'run', 'db-reset']' returned non-zero exit status 1.
I've tried re-installing the supabase package and re-running the command to no avail.
+1
I was experiencing the same issue:
Installing the current project: 101-ai (0.1.0)
Seed the database...
2023-07-06 15:07:05,943:INFO - NumExpr defaulting to 8 threads.
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Users/damianesteban/src/gpt/GPTeam/src/utils/database/reset.py", line 31, in main
asyncio.run(reset())
File "/opt/homebrew/Cellar/[email protected]/3.11.4_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/runners.py", line 190, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/[email protected]/3.11.4_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/[email protected]/3.11.4_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/Users/damianesteban/src/gpt/GPTeam/src/utils/database/reset.py", line 17, in reset
subprocess.run(["supabase", "db", "reset"])
File "/opt/homebrew/Cellar/[email protected]/3.11.4_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 548, in run
with Popen(*popenargs, **kwargs) as process:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/[email protected]/3.11.4_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 1026, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/opt/homebrew/Cellar/[email protected]/3.11.4_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 1950, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'supabase'
Traceback (most recent call last):
File "/Users/damianesteban/src/gpt/GPTeam/setup.py", line 66, in <module>
subprocess.run(["poetry", "run", "db-reset"], check=True)
File "/opt/homebrew/Cellar/[email protected]/3.11.4_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 571, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['poetry', 'run', 'db-reset']' returned non-zero exit status 1.
I was able to resolve this by running the following:
supabase login
supabase link --project-ref PROJECT_REF
supabase db remote commit
supabase start
Then I followed the instructions and it worked perfectly. I hadn't used Supabase for a project before so I wasn't familiar with it.