Skip to content

v0.2.1命令行执行export报错 #28

Open
@RorschachWwww

Description

@RorschachWwww

执行export langchain-ai/langchain报错:
Unexpected error: [Errno 2] No such file or directory: 'daily_progress/langchain-ai_langchain_2024-10-27.md'
看代码里src.github_client.GitHubClient.export_daily_progress方法直接open文件,没有先创建:
filename = f'daily_progress/{repo.replace("/", "")}{date_str}.md'
with open(filename, 'w') as f:
改成如下代码之后问题消失:
filename = f'daily_progress/{repo.replace("/", "")}{date_str}.md'
directory = os.path.dirname(filename)
if not os.path.exists(directory):
os.makedirs(directory)
with open(filename, 'w') as f:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions