GitHubSentinel icon indicating copy to clipboard operation
GitHubSentinel copied to clipboard

v0.2.1命令行执行export报错

Open RorschachWwww opened this issue 1 year ago • 0 comments
trafficstars

执行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:

RorschachWwww avatar Oct 27 '24 04:10 RorschachWwww