You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
执行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:
The text was updated successfully, but these errors were encountered:
执行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:
The text was updated successfully, but these errors were encountered: