mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-10 00:28:31 +00:00
Fix encoding issue when loading YAML file (#1316)
related to #1270 Co-authored-by: ccw@cht.com.tw <ccw@cht.com.tw> Co-authored-by: João Moura <joaomdmoura@gmail.com>
This commit is contained in:
@@ -35,7 +35,7 @@ def CrewBase(cls):
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def load_yaml(config_path: Path):
|
def load_yaml(config_path: Path):
|
||||||
try:
|
try:
|
||||||
with open(config_path, "r") as file:
|
with open(config_path, "r", encoding="utf-8") as file:
|
||||||
return yaml.safe_load(file)
|
return yaml.safe_load(file)
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
print(f"File not found: {config_path}")
|
print(f"File not found: {config_path}")
|
||||||
|
|||||||
Reference in New Issue
Block a user