Skip to content

Copy command seems not working #1021

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

Open
dmpetrov opened this issue Apr 1, 2025 · 2 comments
Open

Copy command seems not working #1021

dmpetrov opened this issue Apr 1, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@dmpetrov
Copy link
Member

dmpetrov commented Apr 1, 2025

Description

# Copy a file
$ datachain cp test.py gs://mpii-human-pose/test.py

# No files:
$ datachain ls --update gs://mpii-human-pose/ | grep test

# But:
$ datachain cp test.py gs://mpii-human-pose/test.py
Error: Path already exists: gs://mpii-human-pose/test.py

🤷‍♂

Version Info


@dmpetrov dmpetrov added the bug Something isn't working label Apr 1, 2025
@ilongin
Copy link
Contributor

ilongin commented Apr 4, 2025

@dmpetrov I assume you want to copy local file to cloud bucket, but this is not something we support in cp at the moment. It only allows copying files from cloud to local directory.

What happens in your example is on first command test,py is seen as "source" and gs://mpii-human-pose/test.py is seen as local directory destination and you end up creating gs:///mpii-human-pose/test.py in your working directory.
Second command lists actual bucket and there is no test.py in it, as expected.
Third command tries to do the same as first one but that directory path ( gs:///mpii-human-pose/test.py) with file already exists locally.

Should we create new issue to implement copy from local to cloud?

@dmpetrov
Copy link
Member Author

dmpetrov commented Apr 4, 2025

@ilongin thank you for the explanation! Let's keep it open for now. We might need some simple shortcuts anyway like download() and upload() and implement a proper cp later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants