Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error new installation #1373

Open
1 task done
owgit opened this issue Nov 28, 2023 · 7 comments
Open
1 task done

Error new installation #1373

owgit opened this issue Nov 28, 2023 · 7 comments

Comments

@owgit
Copy link

owgit commented Nov 28, 2023

⚠️ 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.

@bonze82
Copy link

bonze82 commented Nov 28, 2023

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

@bonze82 bonze82 mentioned this issue Nov 28, 2023
1 task
This was referenced Nov 29, 2023
Fluder-Paradyne added a commit that referenced this issue Nov 29, 2023
* use get_config

* add a check on the key
Fluder-Paradyne added a commit that referenced this issue Nov 29, 2023
* use get_config

* add a check on the key
@derkahless
Copy link

derkahless commented Nov 29, 2023

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           |

@Fluder-Paradyne
Copy link
Collaborator

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

@derkahless
Copy link

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

@owgit
Copy link
Author

owgit commented Nov 30, 2023

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 ?

@Fluder-Paradyne
Copy link
Collaborator

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

@kloudtaxi
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants