Describe the bug
Was running Legal-Swarm-Template/main.py in a colab notebook with python 3.10:
Traceback (most recent call last):
File "/content/Legal-Swarm-Template/main.py", line 7, in <module>
from swarms.agents.create_agents_from_yaml import (
File "/usr/local/lib/python3.10/dist-packages/swarms/__init__.py", line 6, in <module>
from swarms.telemetry.bootup import bootup # noqa: E402, F403
File "/usr/local/lib/python3.10/dist-packages/swarms/telemetry/bootup.py", line 7, in <module>
from swarms.utils.disable_logging import disable_logging
File "/usr/local/lib/python3.10/dist-packages/swarms/utils/__init__.py", line 2, in <module>
from swarms.utils.data_to_text import (
File "/usr/local/lib/python3.10/dist-packages/swarms/utils/data_to_text.py", line 5, in <module>
from swarms.utils.pdf_to_text import pdf_to_text
File "/usr/local/lib/python3.10/dist-packages/swarms/utils/pdf_to_text.py", line 2, in <module>
from swarms.utils.try_except_wrapper import try_except_wrapper
File "/usr/local/lib/python3.10/dist-packages/swarms/utils/try_except_wrapper.py", line 5, in <module>
from swarms.utils.loguru_logger import logger
File "/usr/local/lib/python3.10/dist-packages/swarms/utils/loguru_logger.py", line 8, in <module>
os.path.join(WORKSPACE_DIR, "swarms.log"),
File "/usr/lib/python3.10/posixpath.py", line 76, in join
a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType
The error is occurring because WORKSPACE_DIR, which is used for logging is not set.
The .env.example fot Legal-Swarms-Template only includes the OpenAI and Groq api keys.
When someone uses the template, and not the swarms source install, they would not see the full list of environment variables assumed to be available in swarms, as shown in swarms/.env.example
Perhaps a more robust swarms install process, or configuration tool could be used to set the env vars in projects that use swarms.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too