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

Command failed with exit code 2. #43

Closed
mayurmeta opened this issue Mar 17, 2024 · 2 comments
Closed

Command failed with exit code 2. #43

mayurmeta opened this issue Mar 17, 2024 · 2 comments

Comments

@mayurmeta
Copy link

I installed node, installed yarn and imported the repo from cmd.

I have "mp4, mov, jpg, heic, png, 3gp, jpeg, gif, mo, webm, dng, webp" in the zip extracted folder.

Or do I have to keep only zip file in the inputDir?

As suggested: "yarn start --inputDir ~/takeout --outputDir ~/output --errorDir ~/error"

My folders are "yarn start --D:\Trial ~/takeout --D:\Output ~/output --D:\Error ~/error"
this gave me error and I tried several other formats. I am getting same error. Please see below:

C:\Users\Mayur Satpute\google-photos-exif>yarn start --D:\Trial D:\Output D:\Error
yarn run v1.22.22
$ ./bin/run --D:\Trial D:\Output D:\Error
» Error: Unexpected arguments: --D:\Trial, D:\Output, D:\Error
» See more help with --help
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

C:\Users\Mayur Satpute\google-photos-exif>yarn start "D:\Trial" "D:\Output" "D:\Error"
yarn run v1.22.22
$ ./bin/run D:\Trial D:\Output D:\Error
» Error: Unexpected arguments: D:\Trial, D:\Output, D:\Error
» See more help with --help
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

C:\Users\Mayur Satpute\google-photos-exif>yarn start --D:\Trial --D:\Output --D:\Error
yarn run v1.22.22
$ ./bin/run --D:\Trial --D:\Output --D:\Error
» Error: Unexpected arguments: --D:\Trial, --D:\Output, --D:\Error
» See more help with --help
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

C:\Users\Mayur Satpute\google-photos-exif>yarn start --D:\Trial ~/takeout --D:\Output ~/output --D:\Error ~/error
yarn run v1.22.22
$ ./bin/run --D:\Trial ~/takeout --D:\Output ~/output --D:\Error ~/error
» Error: Unexpected arguments: --D:\Trial, ~/takeout, --D:\Output, ~/output, --D:\Error, ~/error
» See more help with --help
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

@mattwilson1024
Copy link
Owner

You need three folders:

  • input folder containing the extracted contents of the zip (the tool won't do anything with the .zip file itself)
  • output folder (initially empty)
  • error folder (initially empty)

You need to provide three separate arguments, --inputDir, --outputDir and --errorDir each pointing to the path of the three folders. So something like this:

yarn start --inputDir D:\Trial --outputDir D:\Output --errorDir D:\Error

@mayurmeta
Copy link
Author

Thank you so much Matt, it worked. Although the exif data in my Google takeout was incorrect by few hours. Because in my file "properties > Details > Origin > Date taken" - I can see the correct information.

But this git definitely worked. I am a not technical guy and I did not know how to run this. I tried in vs code and searched google, took help from ChatGPT, Google Gemini but nothing worked. Finally I found a post by "Xnehaxixh" (https://github.com/Xnehaxixh) commented on Sep 7, 2023

And with the next step Matt "mattwilson1024" helped me. So here is how it works, if someone like me is trying to find the solution to Google photos takeout mess:

  1. Install Node
  2. In CMD run following command
    node -v
  3. Install Yarn
  4. In CMD run following command
    npm install
  5. In CMD run following command
    npm install
  6. Check Yan. In CMD run following command
    yarn --version
  7. Clone the repo
    In CMD run following command
    git clone https://github.com/mattwilson1024/google-photos-exif
  8. In CMD run following command
    cd google-photos-exif
  9. In CMD run following command
    yarn
  10. Extract your zipped Google takeout photos to a folder, that will be your inputDir
  11. Create Output and Error folders
  12. In my case inputDir is D:\March
    So for me final CMD command will be
    yarn start --inputDir D:\March --outputDir D:\Output --errorDir D:\Error

I hope this helps someone. Cheers!

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