-
Notifications
You must be signed in to change notification settings - Fork 276
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
version 0.5.0 recursively copy remote folder fails #359
Comments
It would be very helpful if you could set up your example as a test function, so that we can fix it and know that the fix works. Also, a traceback showing where the FielNotFound is coming from - is this on the local system, or is s3fs trying to download files that don't exist? Note that I intend to implement fsspec/gcsfs#280 for s3fs, which should make this simpler. |
@martindurant issue still exists with s3fs 0.5.1 (which I assume has your changes to find). The problem is like you mentioned
Because _get_file is not checking if Full tracebak:
|
I would suggest rather than checking each path to whether it is a key or not (which may be expensive - the best way to check is to try to download), we implement "ignoring" or exceptions in the bulk operations. For example, Alternatively, the keys to be got could be sorted such that folders always come last - if we already created a local folder, then we cannot overwrite it with the contents of a remote key with the same name, even if it exists. What do you think? |
seems more robust, I'd go for that one, even though it might be slower. It this an easy change on those functions I mentioned? any more pointers on what should be done? I can give it a try. |
fsspec/filesystem_spec#409 does a similar thing for |
@martindurant https://github.com/dask/s3fs/pull/368/files#diff-1997c4b809971172b55a040ccbb82ea0R694 implements a fix similar to what suggested when opening this issue correct? Not sure of the impact of: Do you still want to implement the following?
|
Yes, it is the same; the directories should all be created up front, and then an attempt to download a key with the same name as a directory will be ignored. Since
Yes, this is reasonable. As I say, I would hope not to have to repeat the code, and this should be possible (although the default value might be "ignore" for rm and something else for the others). |
What happened:
recursively copying a remote folder fails. it looks like async _get_file does handle directories paths properly.
new aio code (0.5.0):
old code (0.4.2):
when copying recursively a remote folder with the latest aio code, rpath is not checked to be a directory and this causes
FileNotFoundError: The specified key does not exist.
With version 0.4.2 this works fine.
Folder structure
Environment:
The text was updated successfully, but these errors were encountered: