Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
RorschachWwww opened this issue Oct 27, 2024 · 0 comments
Open

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

RorschachWwww opened this issue Oct 27, 2024 · 0 comments

Comments

@RorschachWwww
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant