mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-09 16:18:30 +00:00
fix: message
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
import click
|
import click
|
||||||
|
import tomllib
|
||||||
|
|
||||||
|
|
||||||
def run_crew() -> None:
|
def run_crew() -> None:
|
||||||
@@ -9,15 +10,16 @@ def run_crew() -> None:
|
|||||||
"""
|
"""
|
||||||
command = ["uv", "run", "run_crew"]
|
command = ["uv", "run", "run_crew"]
|
||||||
try:
|
try:
|
||||||
subprocess.run(
|
subprocess.run(command, capture_output=False, text=True, check=True)
|
||||||
command, capture_output=False, text=True, check=True, stderr=subprocess.PIPE
|
|
||||||
)
|
|
||||||
|
|
||||||
except subprocess.CalledProcessError as e:
|
except subprocess.CalledProcessError as e:
|
||||||
click.echo(f"An error occurred while running the crew: {e}", err=True)
|
click.echo(f"An error occurred while running the crew: {e}", err=True)
|
||||||
click.echo(e.output, err=True, nl=True)
|
click.echo(e.output, err=True, nl=True)
|
||||||
click.echo(e.stderr, err=True, nl=True)
|
|
||||||
if "table found" in e.stderr:
|
with open("pyproject.toml", "rb") as f:
|
||||||
|
data = tomllib.load(f)
|
||||||
|
|
||||||
|
if data.get("tool", {}).get("poetry"):
|
||||||
click.secho(
|
click.secho(
|
||||||
"It's possible that you are using an old version of crewAI that uses poetry, please run `crewai update` to update your pyproject.toml to use uv.",
|
"It's possible that you are using an old version of crewAI that uses poetry, please run `crewai update` to update your pyproject.toml to use uv.",
|
||||||
fg="yellow",
|
fg="yellow",
|
||||||
|
|||||||
Reference in New Issue
Block a user