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

aioshutil.make_archive sometimes return FileNotFoundError when concurrent request #10

Open
mydu27 opened this issue Nov 24, 2022 · 1 comment

Comments

@mydu27
Copy link

mydu27 commented Nov 24, 2022

Actually I have a restful API, it will compress folder to zip and return zip file. But if I concurrent request many different folder to compress, some request will return error like this:
image

My code is:
image

@federicocagnola
Copy link

I have the same exact issue, this is due to the underlying shutil implementation, which calls os.chdir multiple times
Wrapping this in a thread assumes the caller is the only one manipulating the current directory, and that is not the case when awaiting the wrapped task

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

2 participants