Closed EpicApex closed 1 year ago
Hey @EpicApex looks like you have changed the code and changed the default user.
superagi-backend-1 | 2023-07-09 13:40:55 UTC - Super AGI - INFO - [/app/main.py:152] - User(id=1, name='SuperAGI User', email='[xxx@agi.com](mailto:xxx@agi.com)', password='xxx',organisation_id=None)
For local uses we create a hardcoded user any reason you changed the default user?
Can you revert back to original and try again.
Hi @luciferlinx101,
I actually didnt know that there is a default settings.
Although I I assumed you made it static but just to make sure i've changed the credentials to 'xxx' by intention in this ticket only without changing any hardcoded code by you guys.
Any intakes after that is being cleared?
Hey you can revert back to default and there shouldn't be any issue.
I think I wasnt clear before I'll try again.
Changes we're made only on this this "issue" page. (static changes)
No changes we're made to default 0.0.7v code, build was always erroneous. ( standard git clone )
Is there any more information you need?
Closing the issue for now. Please feel free to reopen it if you feel it's unresolved!
⚠️ Check for existing issues before proceeding. ⚠️
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.
Hello,
Description:
Trying to use SuperAGI v0.0.7 locally fails on organization_id = None
Note - I've used v0.0.5 successfully, the failure comes when upgrading to 0.0.7 ( Ofcourse this still recreates on a fresh clean git clone )
Issue
orgranization_id cannot be 'None' as toolkit requires it.
You can find organization_id in a couple of sections
Path: SuperAGI/main.py
if default_user is not None: organisation = session.query(Organisation).filter_by(id=default_user.organisation_id).first() logger.info(organisation) register_toolkits(session, organisation)
Path: SuperAGI/superagi/models/organisation.py
if user.organisation_id is not None: organisation = session.query(Organisation).filter(Organisation.id == user.organisation_id).first() return organisation
The Problem
No organization_id can be input by the user in the config.yaml file - nor do we have a guidance in the installation guide on a static organization id ( without the first in the filter )
Issue is simple to recreate
1) git clone 2) set config.yaml with the relevant data including
ENV: 'DEV'
3) set agent_executor.py to use pinecone 'free tier' replica set index memory = VectorFactory.get_vector_storage(VectorStoreType.PINECONE, "my-current-indexname-cosine", memory = VectorFactory.get_vector_storage("PineCone", "my-current-indexname-cosine",My own env
Any help is appreciated <3
How to replicate your Issue?
1) git clone 2) set config.yaml with the relevant data including
ENV: 'DEV'
3) set agent_executor.py to use pinecone 'free tier' replica set index memory = VectorFactory.get_vector_storage(VectorStoreType.PINECONE, "my-current-indexname-cosine", memory = VectorFactory.get_vector_storage("PineCone", "my-current-indexname-cosine",Upload Error Log Content
superagi-backend-1 | INFO [alembic.runtime.migration] Context impl PostgresqlImpl. superagi-backend-1 | INFO [alembic.runtime.migration] Will assume transactional DDL. superagi-backend-1 | INFO: Will watch for changes in these directories: ['/app'] superagi-backend-1 | INFO: Uvicorn running on http://0.0.0.0:8001 (Press CTRL+C to quit) superagi-backend-1 | INFO: Started reloader process [1] using WatchFiles superagi-gui-1 | - event compiled client and server successfully in 15.6s (651 modules) superagi-gui-1 | - wait compiling... superagi-gui-1 | - event compiled client and server successfully in 5.1s (651 modules) superagi-backend-1 | INFO: Started server process [26] superagi-backend-1 | INFO: Waiting for application startup. superagi-backend-1 | 2023-07-09 13:40:55 UTC - Super AGI - INFO - [/app/main.py:148] - Running Startup tasks superagi-backend-1 | 2023-07-09 13:40:55 UTC - Super AGI - INFO - [/app/main.py:152] - User(id=1, name='SuperAGI User', email='xxx@agi.com', password='xxx',organisation_id=None) superagi-backend-1 | 2023-07-09 13:40:55 UTC - Super AGI - INFO - [/app/main.py:155] - None superagi-backend-1 | ERROR: Traceback (most recent call last): superagi-backend-1 | File "/usr/local/lib/python3.9/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 "/usr/local/lib/python3.9/site-packages/starlette/routing.py", line 566, in aenter superagi-backend-1 | await self._router.startup() superagi-backend-1 | File "/usr/local/lib/python3.9/site-packages/starlette/routing.py", line 654, in startup superagi-backend-1 | await handler() superagi-backend-1 | File "/app/main.py", line 156, in startup_event superagi-backend-1 | register_toolkits(session, organisation) superagi-backend-1 | File "/app/superagi/helper/tool_helper.py", line 248, in register_toolkits superagi-backend-1 | logger.info(f"Toolkits Registered Successfully for Organisation ID : {organisation.id}!") superagi-backend-1 | AttributeError: 'NoneType' object has no attribute 'id' superagi-backend-1 | superagi-backend-1 | ERROR: Application startup failed. Exiting.