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

Error new installation

owgit 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?

MacOS

Which branch of SuperAGI are you using?

Main

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.

I get error when I trying to install it in my local machine

superagi-backend-1 | The above exception was the direct cause of the following exception:
superagi-backend-1 |
superagi-backend-1 | Traceback (most recent call last):
superagi-backend-1 | File "/usr/local/lib/python3.10/multiprocessing/process.py", line 314, in _bootstrap
superagi-backend-1 | self.run()
superagi-backend-1 | File "/usr/local/lib/python3.10/multiprocessing/process.py", line 108, in run
superagi-backend-1 | self._target(*self._args, **self._kwargs)
superagi-backend-1 | File "/opt/venv/lib/python3.10/site-packages/uvicorn/_subprocess.py", line 76, in subprocess_started
superagi-backend-1 | target(sockets=sockets)
superagi-backend-1 | File "/opt/venv/lib/python3.10/site-packages/uvicorn/server.py", line 61, in run
superagi-backend-1 | return asyncio.run(self.serve(sockets=sockets))
superagi-backend-1 | File "/usr/local/lib/python3.10/asyncio/runners.py", line 44, in run
superagi-backend-1 | return loop.run_until_complete(main)
superagi-backend-1 | File "uvloop/loop.pyx", line 1517, in uvloop.loop.Loop.run_until_complete
superagi-backend-1 | File "/opt/venv/lib/python3.10/site-packages/uvicorn/server.py", line 68, in serve
superagi-backend-1 | config.load()
superagi-backend-1 | File "/opt/venv/lib/python3.10/site-packages/uvicorn/config.py", line 473, in load
superagi-backend-1 | self.loaded_app = import_from_string(self.app)
superagi-backend-1 | File "/opt/venv/lib/python3.10/site-packages/uvicorn/importer.py", line 21, in import_from_string
superagi-backend-1 | module = importlib.import_module(module_str)
superagi-backend-1 | File "/usr/local/lib/python3.10/importlib/init.py", line 126, in import_module
superagi-backend-1 | return _bootstrap._gcd_import(name[level:], package, level)
superagi-backend-1 | File "", line 1050, in _gcd_import
superagi-backend-1 | File "", line 1027, in _find_and_load
superagi-backend-1 | File "", line 1006, in _find_and_load_unlocked
superagi-backend-1 | File "", line 688, in _load_unlocked
superagi-backend-1 | File "", line 883, in exec_module
superagi-backend-1 | File "", line 241, in _call_with_frames_removed
superagi-backend-1 | File "/app/main.py", line 15, in
superagi-backend-1 | from superagi.agent.workflow_seed import IterationWorkflowSeed, AgentWorkflowSeed
superagi-backend-1 | File "/app/superagi/agent/workflow_seed.py", line 1, in
superagi-backend-1 | from superagi.agent.agent_prompt_builder import AgentPromptBuilder
superagi-backend-1 | File "/app/superagi/agent/agent_prompt_builder.py", line 6, in
superagi-backend-1 | from superagi.helper.token_counter import TokenCounter
superagi-backend-1 | File "/app/superagi/helper/token_counter.py", line 7, in
superagi-backend-1 | from superagi.models.models import Models
superagi-backend-1 | File "/app/superagi/models/models.py", line 7, in
superagi-backend-1 | from superagi.helper.encyption_helper import decrypt_data
superagi-backend-1 | File "/app/superagi/helper/encyption_helper.py", line 12, in
superagi-backend-1 | cipher_suite = Fernet(key)
superagi-backend-1 | File "/opt/venv/lib/python3.10/site-packages/cryptography/fernet.py", line 36, in init
superagi-backend-1 | raise ValueError(
superagi-backend-1 | ValueError: Fernet key must be 32 url-safe base64-encoded bytes.

How to replicate your Issue?

I just trying to install it from the tutorial.

Upload Error Log Content

ValueError: Fernet key must be 32 url-safe base64-encoded bytes.

I have the same exact issue
docker compose up --build
linux x64_86 6.1.55
debian 12.2
docker 2.21.0
python 3.11.2

downloaded @ 1330 cst

Hi!
I'm not sure if that is related:

(Vanilla deploy for llama)

celery_1           | Installing collected packages: superagi-tools
celery_1           |   Attempting uninstall: superagi-tools
celery_1           |     Found existing installation: superagi-tools 1.0.8
celery_1           |     Uninstalling superagi-tools-1.0.8:
celery_1           |       Successfully uninstalled superagi-tools-1.0.8
celery_1           | Successfully installed superagi-tools-1.0.6
celery_1           | Usage: celery [OPTIONS] COMMAND [ARGS]...
celery_1           | Try 'celery --help' for help.
celery_1           |
celery_1           | Error: Invalid value for '-A' / '--app':
celery_1           | Unable to load celery application.
celery_1           | While trying to load the module superagi.worker the following error occurred:
celery_1           | Traceback (most recent call last):
celery_1           |   File "/opt/venv/lib/python3.10/site-packages/celery/app/utils.py", line 384, in find_app
celery_1           |     sym = symbol_by_name(app, imp=imp)
celery_1           |   File "/opt/venv/lib/python3.10/site-packages/kombu/utils/imports.py", line 61, in symbol_by_name
celery_1           |     return getattr(module, cls_name) if cls_name else module
celery_1           | AttributeError: module 'superagi' has no attribute 'worker'
celery_1           |
celery_1           | During handling of the above exception, another exception occurred:
celery_1           |
celery_1           | Traceback (most recent call last):
celery_1           |   File "/opt/venv/lib/python3.10/site-packages/celery/bin/celery.py", line 57, in convert
celery_1           |     return find_app(value)
celery_1           |   File "/opt/venv/lib/python3.10/site-packages/celery/app/utils.py", line 387, in find_app
celery_1           |     sym = imp(app)
celery_1           |   File "/opt/venv/lib/python3.10/site-packages/celery/utils/imports.py", line 105, in import_from_cwd
celery_1           |     return imp(module, package=package)
celery_1           |   File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
celery_1           |     return _bootstrap._gcd_import(name[level:], package, level)
celery_1           |   File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
celery_1           |   File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
celery_1           |   File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
celery_1           |   File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
celery_1           |   File "<frozen importlib._bootstrap_external>", line 883, in exec_module
celery_1           |   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
celery_1           |   File "/app/superagi/worker.py", line 6, in <module>
celery_1           |     from superagi.helper.tool_helper import handle_tools_import
celery_1           |   File "/app/superagi/helper/tool_helper.py", line 14, in <module>
celery_1           |     from superagi.models.tool_config import ToolConfig
celery_1           |   File "/app/superagi/models/tool_config.py", line 5, in <module>
celery_1           |     from superagi.helper.encyption_helper import encrypt_data
celery_1           |   File "/app/superagi/helper/encyption_helper.py", line 13, in <module>
celery_1           |     raise ValueError("Encryption key must be 32 bytes long.")
celery_1           | ValueError: Encryption key must be 32 bytes long.
celery_1           |

Hi can you create the config.yaml again or give a 32 character key for Encryption_key

Hi! After fixing my broken system and re- cloning the repo it works now, the fault was on my side. :)

Hi can you create the config.yaml again or give a 32 character key for Encryption_key

I re created config , where can I "give " it a key ?

in the config.yaml there would be
ENCRYPTION_KEY: abcdefghijklmnopqrstuvwxyz123456
you can keep this or change to something else of same lenght

@Fluder-Paradyne encoding the encryption key to base64 worked for me