mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-04 21:32:38 +02:00
fixbug: empty string causes aiofiles.open exepctition
This commit is contained in:
parent
9e9e0d56e5
commit
35470dcee4
1 changed files with 1 additions and 1 deletions
|
|
@ -62,7 +62,7 @@ async def startup(lesson_file: str, investment: float = 3.0, n_round: int = 1, *
|
|||
"""
|
||||
|
||||
lesson = ""
|
||||
if lesson_file is not None and Path(lesson_file).exists():
|
||||
if lesson_file and Path(lesson_file).exists():
|
||||
async with aiofiles.open(lesson_file, mode="r", encoding="utf-8") as reader:
|
||||
lesson = await reader.read()
|
||||
logger.info(f"Course content: {lesson}")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue