TransformerOptimus / SuperAGI

<⚡️> SuperAGI - A dev-first open source autonomous AI agent framework. Enabling developers to build, manage & run useful autonomous agents quickly and reliably.

Home Page:https://superagi.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Deployment Getting Failed

ganeshbehera opened this issue · comments

⚠️ Check for existing issues before proceeding. ⚠️

  • I have searched the existing issues, and there is no existing issue for my problem

Where are you using SuperAGI?

Linux

Which branch of SuperAGI are you using?

Dev (branch)

Do you use OpenAI GPT-3.5 or GPT-4?

GPT-3.5

Which area covers your issue best?

Installation and setup

Describe your issue.

Deployment Getting failed, Please fix it

How to replicate your Issue?

No response

Upload Error Log Content

[2023-10-25 09:15:51] ERROR: Traceback (most recent call last): [2023-10-25 09:15:51] File "/opt/venv/lib/python3.10/site-packages/starlette/routing.py", line 677, in lifespan [2023-10-25 09:15:51] async with self.lifespan_context(app) as maybe_state: [2023-10-25 09:15:51] File "/opt/venv/lib/python3.10/site-packages/starlette/routing.py", line 566, in aenter [2023-10-25 09:15:51] await self._router.startup() [2023-10-25 09:15:51] File "/opt/venv/lib/python3.10/site-packages/starlette/routing.py", line 654, in startup [2023-10-25 09:15:51] await handler() [2023-10-25 09:15:51] File "/app/main.py", line 249, in startup_event [2023-10-25 09:15:51] local_llm_model_config() [2023-10-25 09:15:51] File "/app/main.py", line 221, in local_llm_model_config [2023-10-25 09:15:51] existing_models_config = session.query(ModelsConfig).filter(ModelsConfig.org_id == default_user.organisation_id, ModelsConfig.provider == 'Local LLM').first() [2023-10-25 09:15:51] AttributeError: 'NoneType' object has no attribute 'organisation_id' [2023-10-25 09:15:51] [2023-10-25 09:15:51] ERROR: Application startup failed. Exiting.

same here for win11

I am also getting this as well. I've redownloaded the application and i still get this error.

I also get this error.

When I try to load localhost:3000 I see the SuperAGI logo in the top left and Ïnitailizing SuperAGI... loading and get no further

This is happening in the superagi-backend-1 container in docker using superagi-backend

Same issue on Mac OS 14

same error here, if I take the log back a couple of extra lines i have:
superagi-backend-1 | 2023-10-27 19:42:38 UTC - Super AGI - INFO - [/app/main.py:197] - Running Startup tasks superagi-backend-1 | 2023-10-27 19:42:38 UTC - Super AGI - INFO - [/app/main.py:201] - None superagi-backend-1 | 2023-10-27 19:42:39 UTC - Super AGI - INFO - [/app/superagi/models/workflows/agent_workflow_step.py:157] - Finding or creating wait step superagi-backend-1 | ERROR: Traceback (most recent call last): superagi-backend-1 | File "/opt/venv/lib/python3.10/site-packages/starlette/routing.py", line 677, in lifespan superagi-backend-1 | async with self.lifespan_context(app) as maybe_state: superagi-backend-1 | File "/opt/venv/lib/python3.10/site-packages/starlette/routing.py", line 566, in __aenter__ superagi-backend-1 | await self._router.startup() superagi-backend-1 | File "/opt/venv/lib/python3.10/site-packages/starlette/routing.py", line 654, in startup superagi-backend-1 | await handler() superagi-backend-1 | File "/app/main.py", line 249, in startup_event superagi-backend-1 | local_llm_model_config() superagi-backend-1 | File "/app/main.py", line 221, in local_llm_model_config superagi-backend-1 | existing_models_config = session.query(ModelsConfig).filter(ModelsConfig.org_id == default_user.organisation_id, ModelsConfig.provider == 'Local LLM').first() superagi-backend-1 | AttributeError: 'NoneType' object has no attribute 'organisation_id' superagi-backend-1 | superagi-backend-1 | ERROR: Application startup failed. Exiting.

Where the second line says None this is a log of default_user.
The Errr on line 221 is trying to use default_user.organisation_id however as per the previous log our default_user is None so it does not contain an organisation_id.

Unfortunately I can understand why I see the error, but I have not the skill (yet) to go about finding a solution.

I'm getting the same issue on Windows 11 using the docker install. It seems like the default_user for the postgress database "super6@agi.com" should exist but doesn't?

Line 200 tries to load the default_user and when line 201 logs it the output is "None" and this seems to fail line 221?

--CODE--
200 default_user = session.query(User).filter(User.email == "super6@agi.com").first()
201 logger.info(default_user)

221 existing_models_config = session.query(ModelsConfig).filter(ModelsConfig.org_id == default_user.organisation_id, ModelsConfig.provider == 'Local LLM').first()

--LOG--

2023-10-28 09:07:00 superagi-backend-1 | INFO: Started server process [315]
2023-10-28 09:07:00 superagi-backend-1 | INFO: Waiting for application startup.
2023-10-28 09:07:00 superagi-backend-1 | 2023-10-28 08:07:00 UTC - Super AGI - INFO - [/app/main.py:197] - Running Startup tasks
2023-10-28 09:07:00 superagi-backend-1 | 2023-10-28 08:07:00 UTC - Super AGI - INFO - [/app/main.py:201] - None
2023-10-28 09:07:00 superagi-backend-1 | 2023-10-28 08:07:00 UTC - Super AGI - INFO - [/app/superagi/models/workflows/agent_workflow_step.py:157] - Finding or creating wait step
2023-10-28 09:07:00 superagi-backend-1 | ERROR: Traceback (most recent call last):
2023-10-28 09:07:00 superagi-backend-1 | File "/opt/venv/lib/python3.10/site-packages/starlette/routing.py", line 677, in lifespan
2023-10-28 09:07:00 superagi-backend-1 | async with self.lifespan_context(app) as maybe_state:
2023-10-28 09:07:00 superagi-backend-1 | File "/opt/venv/lib/python3.10/site-packages/starlette/routing.py", line 566, in aenter
2023-10-28 09:07:00 superagi-backend-1 | await self._router.startup()
2023-10-28 09:07:00 superagi-backend-1 | File "/opt/venv/lib/python3.10/site-packages/starlette/routing.py", line 654, in startup
2023-10-28 09:07:00 superagi-backend-1 | await handler()
2023-10-28 09:07:00 superagi-backend-1 | File "/app/main.py", line 249, in startup_event
2023-10-28 09:07:00 superagi-backend-1 | local_llm_model_config()
2023-10-28 09:07:00 superagi-backend-1 | File "/app/main.py", line 221, in local_llm_model_config
2023-10-28 09:07:00 superagi-backend-1 | existing_models_config = session.query(ModelsConfig).filter(ModelsConfig.org_id == default_user.organisation_id, ModelsConfig.provider == 'Local LLM').first()
2023-10-28 09:07:00 superagi-backend-1 | AttributeError: 'NoneType' object has no attribute 'organisation_id'

Same issue on Mac M2

I found a workaround
After the --build command the DB do not have any default user or organization created.
So if you modify the docker-compose file to allow to expose the Postgres ports you can manually create an user and an organization after that do restart the containers and should work.

it's a workaround not a fix.

Getting the same error. It appears to have been introduced by PR: #1351

For anyone blocked while awaiting a fix, I was able to succesfully startup by commenting out this line.
https://github.com/TransformerOptimus/SuperAGI/blob/b96fdabcf6a20d4309bfb5ff99a144d59cd74dd0/main.py#L249C18-L249C18

Getting the same error. It appears to have been introduced by PR: #1351

For anyone blocked while awaiting a fix, I was able to succesfully startup by commenting out this line. https://github.com/TransformerOptimus/SuperAGI/blob/b96fdabcf6a20d4309bfb5ff99a144d59cd74dd0/main.py#L249C18-L249C18

This is a very good work around.

Specifically this line

image

We have fixed this issue in #1353 (fixes for the main branch) and #1354 (fixes for the dev branch).