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

Error: Command failed: C:\WINDOWS\system32\cmd.exe #77

Open
erezger opened this issue May 31, 2016 · 16 comments
Open

Error: Command failed: C:\WINDOWS\system32\cmd.exe #77

erezger opened this issue May 31, 2016 · 16 comments

Comments

@erezger
Copy link

erezger commented May 31, 2016

hello i am having this issue

{ [Error: Command failed: C:\WINDOWS\system32\cmd.exe /s /c "identify -format "name=
size=%[size]
format=%m
colorspace=%[colorspace]
height=%[height]
width=%[width]
orientation=%[orientation]
" /images/erez.jpg"
'identify' is not recognized as an internal or external command,
operable program or batch file.
]
  killed: false,
  code: 1,
  signal: null,
  cmd: 'C:\\WINDOWS\\system32\\cmd.exe /s /c "identify -format "name=\nsize=%[size]\nformat=%m\ncolorspace=%[colorspace]\nheight=%[height]\nwidth=%[width]\norientation=%[orientation]\n" /images/erez.jpg"' }

this is my code

var Upload = require('s3-uploader');
var im = require('imagemagick');
var client = new Upload('radiomize', {
  aws: {
    path: 'images/',
    region: 'eu-west-1',
    accessKeyId: 'key',
    secretAccessKey: 'key'
  }, 
  cleanup: {
    versions: true,
    original: false
  }, 
  original: {
    awsImageAcl: 'private'
  },
  versions: [{
    maxHeight: 1040,
    maxWidth: 1040,
    format: 'jpg',
    suffix: '-large',
    quality: 80,
    awsImageExpires: 31536000,
    awsImageMaxAge: 31536000
  },{
    maxWidth: 780,
    aspect: '3:2!h',
    suffix: '-medium'
  },{
    maxWidth: 320,
    aspect: '16:9!h',
    suffix: '-small'
  },{
    maxHeight: 100,
    aspect: '1:1',
    format: 'png',
    suffix: '-thumb1'
  },{
    maxHeight: 250,
    maxWidth: 250,
    aspect: '1:1',
    suffix: '-thumb2'
  }]
});
app.post('/upload', function(req, res) {
    client.upload('/images/erez.jpg', {  }, function(err, versions, meta) {
        if (err) { console.log(err); return; }
        versions.forEach(function(image) {
            console.log(image.width, image.height, image.url);
        });
    });
});

i was trying adding {mime: "image/jpeg" }
also was trying to see if the image exist and it does exist

Please help me

i am saving the image by multer if its matter

@Starefossen
Copy link
Contributor

Hi @erezger and thank you for using the s3-uploader library 😄

Could you post the following information in order to bets help you with this:

  • Operating system and version
  • Node.js version (node --version)
  • npm version (npm --version)
  • ImageMagick version (identify -version)

@Starefossen
Copy link
Contributor

Make sure you have the latest version of ImageMagick installed since this package requires ImageMagick to be installed.

@erezger
Copy link
Author

erezger commented May 31, 2016

windows 10 64-bit operting system, x64-based processor
latest imagemagick installed
node - v4.4.3
npm - 2.15.1
imagemagick : "^0.1.3"

since you said this required imagemagick
if uplaod this to amazon beanstalk ec2 server it will work?

@Starefossen
Copy link
Contributor

You need to install the ImageMagick binaries for Windows

@erezger
Copy link
Author

erezger commented May 31, 2016

installed ImageMagick-7.0.1-7-Q16-x64-dll.exe
and still not working

since you said this required imagemagick
if uplaod this to amazon beanstalk ec2 server it will work?

@Starefossen
Copy link
Contributor

Sorry for the late response @erezger! Could you open PowerShell and run the following command:

identify -version

@erezger
Copy link
Author

erezger commented Jun 6, 2016

'identify' is not recognized as an internal or external command,
operable program or batch file.

@Starefossen
Copy link
Contributor

You need to reinstall and make sure to check “Add application directory to your system path” in the installation, otherwise Windows won’t recognize any of the commands and tell you something like ‘convert’ is not recognized as an internal or external command, operable program or batch file.

imagemagick_install

@erezger
Copy link
Author

erezger commented Jun 6, 2016

its the default but i reinstalled and still the same error its weird i know
Thanks for the effort apriciete that

@gustavost26
Copy link

gustavost26 commented Jul 6, 2016

I'm having the same problem and can not solve.

Error: Command failed: C:\WINDOWS\system32\cmd.exe /s /c "identify -format "name=
size=%[size]
format=%m
colorspace=%[colorspace]
height=%[height]
width=%[width]
orientation=%[orientation]

@Starefossen
Copy link
Contributor

Starefossen commented Jul 6, 2016

@gustavost26 Could you open PowerShell and copy/paste the output from the following command:

identify -version

@gustavost26
Copy link

And presented the following message: Version: ImageMagick 6.8.6-8 04/08/2013 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2013 ImageMagick Studio LLC
Features: DPC OpenMP
Delegates: bzlib djvu fftw fontconfig freetype jng jp2 jpeg lcms lzma OpenEXR pango png ps tiff webp x xml zlib

@Starefossen
Copy link
Contributor

Starefossen commented Jul 6, 2016

Thanks a lot @gustavost26, I am currently not on a Windows machine so I appreciate you helping me out. Could you try this approach suggested in aheckmann/gm#296:

process.env['PATH'] = "d:\\apps\\ImageMagick-6.8.9-Q16;" + process.env['PATH'];

@gustavost26
Copy link

Thanks a lot.

@jalal-haider-makki
Copy link

In Windows identify command is not available. So, have to create a identify.cmd file in the installation folder of ImageMagick then add following content in it.

magick identify %*

@mklled200
Copy link

C. C: \ Windows \ system32 \ cmd.exe Please help more than once but the same result
[wf] Face type (f / wf / head?: he lp>: wf
wf
In] Write de bug images to aligned_debug? (y / n>: n
Extracting faces ...
Traceback (most recent call last):
File "C: \ Users \ A1-Mawshor \ Documents \ ANYMP4 Studio \ Uideo \ DeepFaceLab_NUIDIAN_i
ternalNDeepFaceLab \ main. py ", line 314, in
arguments..func (arguments>
File "C: NUsersNA1-Mawshor \ Documents \ ANYMP4 Studio \ Video \ DeepFaceLab_NUIDIAN_i
ternalNDeepFaceLab \ main.py ", line 40, in

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

No branches or pull requests

5 participants