mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-10 16:48:30 +00:00
Address PR feedback: Add logging, input validation, and error handling
Co-Authored-By: Joe Moura <joao@crewai.com>
This commit is contained in:
@@ -4,10 +4,15 @@ Example script showing how to run a CrewAI flow from a custom script.
|
||||
This example demonstrates how to avoid the ModuleNotFoundError when
|
||||
starting flows from custom scripts outside of the CLI command context.
|
||||
"""
|
||||
import logging
|
||||
import os
|
||||
|
||||
from crewai.utilities.path_utils import add_project_to_path
|
||||
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
logger.info("Adding project directory to Python path")
|
||||
add_project_to_path()
|
||||
|
||||
from my_flow.main import MyFlow # noqa: E402
|
||||
|
||||
Reference in New Issue
Block a user