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

Problem with imageMagik #448

Closed
patriciamarchand opened this issue Jul 14, 2016 · 5 comments
Closed

Problem with imageMagik #448

patriciamarchand opened this issue Jul 14, 2016 · 5 comments

Comments

@patriciamarchand
Copy link

patriciamarchand commented Jul 14, 2016

Hello,
I have some issue to compare the images and generate the gallery. I install everything according to the documentation for ImageMagick and the path is linked in the variables. When I run the command "wraith capture configs/capture.yaml" with the verbose=true say ImageMagick is uninstalled. It takes the screenshot but it doesn't generate the gallery.

Thanks

* ImageMagick version*
C:_projects\wraith>magick --version
Version: ImageMagick 7.0.2-4 Q16 x64 2016-07-11 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC
...

* Path*
C:_projects\wraith>path
PATH=C:\Program Files\ImageMagick-7.0.2-Q16;C:\ProgramData\Oracle\Java\javapath;C:\Ruby200-x64\bin; ...

* The command run in verbose mode*

C:\_projects\wraith>wraith capture configs/capture.yaml
C:/Ruby200-x64/lib/ruby/2.0.0/rubygems/dependency.rb:296:in `to_specs': Could not find 'casperjs' (>= 0) among 18 total gem(s) (Gem::LoadError)
        from C:/Ruby200-x64/lib/ruby/2.0.0/rubygems/dependency.rb:307:in `to_spec'
        from C:/Ruby200-x64/lib/ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:47:in `gem'
        from C:/opscode/chef/embedded/bin/casperjs:22:in `<main>'
Spécification de lecteur non valide.
DEBUG: #################################################
DEBUG:   Command run:        capture configs/capture.yaml
DEBUG:   Wraith version:     3.2.0
DEBUG:   Ruby version:       ruby 2.0.0p648 (2015-12-16) [x64-mingw32]
DEBUG:   ImageMagick:        ImageMagick not installed
DEBUG:   PhantomJS version:  1.9.2
DEBUG:   CasperJS version:   CasperJS not installed
DEBUG: #################################################
DEBUG:
Config validated. No serious issues found.
Creating Folders
SAVING IMAGES
DEBUG: phantomjs  'C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/wraith-3.2.0/lib/wraith/javascript/phantom.js' 'http://...composantes.html' '320' 'shots/home/320_phantomjs_current.png' 'body' 'C:/_projects/wraith/javascript/wait--phantom
.js' 'false'
DEBUG: phantomjs  'C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/wraith-3.2.0/lib/wraith/javascript/phantom.js' 'http://localhost:4000/...composantes.html' '320' 'shots/home/320_phantomjs_new.png' 'body' 'C:/_projects/wraith/javascript/wait--phantom.js' 'false'
DEBUG: phantomjs  'C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/wraith-3.2.0/lib/wraith/javascript/phantom.js' 'http://...composantes.html' '1280' 'shots/home/1280_phantomjs_current.png' 'body' 'C:/_projects/wraith/javascript/wait--phant
om.js' 'false'
DEBUG: phantomjs  'C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/wraith-3.2.0/lib/wraith/javascript/phantom.js' 'http://localhost:4000/...com
posantes.html' '1280' 'shots/home/1280_phantomjs_new.png' 'body' 'C:/_projects/wraith/javascript/wait--phantom.js' 'false'
DEBUG: phantomjs  'C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/wraith-3.2.0/lib/wraith/javascript/phantom.js' 'http://...composantes.html#buttons' '320' 'shots/about/320_phantomjs_current.png' 'body' 'C:/_projects/wraith/javascript/wait
--phantom.js' 'false'
DEBUG: phantomjs  'C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/wraith-3.2.0/lib/wraith/javascript/phantom.js' 'http://localhost:4000/...composantes.html#buttons' '320' 'shots/about/320_phantomjs_new.png' 'body' 'C:/_projects/wraith/javascript/wait--phantom.js' 'false'
DEBUG: phantomjs  'C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/wraith-3.2.0/lib/wraith/javascript/phantom.js' 'http://dsapplab55.desjardins.uni:20001/n3-a
ppref-visuel-web/documentation/3.3/composantes.html#buttons' '1280' 'shots/about/1280_phantomjs_current.png' 'body' 'C:/_projects/wraith/javascript/wa
it--phantom.js' 'false'
DEBUG: phantomjs  'C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/wraith-3.2.0/lib/wraith/javascript/phantom.js' ‘http://localhost:4000/...composantes.html#buttons' '1280' 'shots/about/1280_phantomjs_new.png' 'body' 'C:/_projects/wraith/javascript/wait--phantom.js' 'false'
Loading http://localhost:4000/...composantes.html at dimensions: 1280x1500
Loading http://...composantes.html  at dimensions: 320x1500
Loading http://...composantes.html  at dimensions: 1280x1500
Loading http://localhost:4000/...composantes.html at dimensions: 320x1500
Loading http://...composantes.html #buttons at dimensions: 320x1500
Loading http://...composantes.html #buttons at dimensions: 1280x1500
Loading http://localhost:4000/...composantes.html#buttons at dimensions: 1280x1500
Loading http://localhost:4000/...composantes.html#buttons at dimensions: 320x1500
Snapping http://localhost:4000/...composantes.html at: 1280x1500
Snapping http://localhost:4000/...composantes.html#buttons at: 1280x1500
Snapping http://localhost:4000/...composantes.html at: 320x1500
Snapping http://localhost:4000/...composantes.html#buttons at: 320x1500
Snapping http://...composantes.html #buttons at: 1280x1500
Snapping http://...composantes.html  at: 320x1500
Snapping http://...composantes.html #buttons at: 320x1500

Snapping http://...composantes.html  at: 1280x1500

CROPPING IMAGES
Process.fork is not supported by this Ruby
DEBUG: Both images are exactly 1280x1500 - no cropping required. (shots/about/1280_phantomjs_current.png, shots/about/1280_phantomjs_new.png)
DEBUG: Both images are exactly 320x1500 - no cropping required. (shots/about/320_phantomjs_current.png, shots/about/320_phantomjs_new.png)
DEBUG: Both images are exactly 1280x1500 - no cropping required. (shots/home/1280_phantomjs_current.png, shots/home/1280_phantomjs_new.png)
DEBUG: Both images are exactly 320x1500 - no cropping required. (shots/home/320_phantomjs_current.png, shots/home/320_phantomjs_new.png)
COMPARING IMAGES
Process.fork is not supported by this Ruby
Comparing shots/about/1280_phantomjs_current.png and shots/about/1280_phantomjs_new.png
C:/Ruby200-x64/lib/ruby/2.0.0/open3.rb:211:in `spawn': No such file or directory - compare -dissimilarity-threshold 1 -fuzz 20% -metric AE -highlight-
color blue shots/about/1280_phantomjs_current.png shots/about/1280_phantomjs_new.png shots/about/1280_phantomjs_diff.png (Errno::ENOENT)
        from C:/Ruby200-x64/lib/ruby/2.0.0/open3.rb:211:in `popen_run'
        from C:/Ruby200-x64/lib/ruby/2.0.0/open3.rb:99:in `popen3'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/wraith-3.2.0/lib/wraith/compare_images.rb:35:in `compare_task'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/wraith-3.2.0/lib/wraith/compare_images.rb:22:in `block in compare_images'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/parallel-1.9.0/lib/parallel.rb:453:in `call'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/parallel-1.9.0/lib/parallel.rb:453:in `call_with_index'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/parallel-1.9.0/lib/parallel.rb:290:in `block in work_direct'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/parallel-1.9.0/lib/parallel.rb:462:in `with_instrumentation'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/parallel-1.9.0/lib/parallel.rb:289:in `work_direct'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/parallel-1.9.0/lib/parallel.rb:237:in `map'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/parallel-1.9.0/lib/parallel.rb:203:in `each'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/wraith-3.2.0/lib/wraith/compare_images.rb:18:in `compare_images'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/wraith-3.2.0/lib/wraith/cli.rb:107:in `block in compare_images'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/wraith-3.2.0/lib/wraith/cli.rb:28:in `within_acceptable_limits'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/wraith-3.2.0/lib/wraith/cli.rb:104:in `compare_images'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/wraith-3.2.0/lib/wraith/cli.rb:138:in `block in capture'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/wraith-3.2.0/lib/wraith/cli.rb:28:in `within_acceptable_limits'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/wraith-3.2.0/lib/wraith/cli.rb:131:in `capture'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/wraith-3.2.0/bin/wraith:5:in `<top (required)>'
        from C:/Ruby200-x64/bin/wraith:23:in `load'
        from C:/Ruby200-x64/bin/wraith:23:in `<main>'

C:\_projects\wraith>

Contents of my config file below:

# (required) The engine to run Wraith with. Examples: 'phantomjs', 'casperjs', 'slimerjs'
browser: "phantomjs"

# (required) The domains to take screenshots of.
domains:
  current:  "URL 1"
  new:      "URL 2"

# (required) The paths to capture. All paths should exist for both of the domains specified above.
paths:
  home:     /composantes.html
  about:    /composantes.html#buttons
  contact:  /composantes.html#icones

# (required) Screen widths (and optional height) to resize the browser to before taking the screenshot.
screen_widths:
  - 320
  - 768
  - 1024
  - 1280

# (optional) JavaScript file to execute before taking screenshot of every path. Default: nil
#before_capture: 'javascript/disable_javascript--phantom.js'
before_capture: 'javascript/wait--phantom.js'

directory: 'shots'

# (required) Amount of fuzz ImageMagick 
fuzz: '20%'

# (optional) The maximum acceptable level of difference (in %) 
threshold: 5

# (optional) Specify the template 
  template: 'slideshow_template' # Examples: 'basic_template' (default), 'slideshow_template'
  thumb_width:  200
  thumb_height: 200

# (optional) Choose which results are displayed in the gallery,
mode: diffs_first

verbose: true
@ChrisBAshton
Copy link
Contributor

This looks like #449 - ImageMagick doesn't appear to be installed.

Strange that we'd have two bug reports like this in the same day - perhaps ImageMagick have released a version which doesn't have the compare command built in?

You say your ImageMagick is this version:

Version: ImageMagick 7.0.2-4 Q16 x64 2016-07-11 http://www.imagemagick.org

What do you get if you run convert -version? For reference, I get:

$ convert -version
Version: ImageMagick 6.9.1-3 Q16 x86_64 2015-05-25 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: DPC Modules
Delegates (built-in): bzlib freetype jng jpeg ltdl lzma png zlib

@patriciamarchand
Copy link
Author

I try to run convert -version but it doesn't work. So I downgraded imagemagick to previous version imagemagick 6.9.5-Q8 and it seems to be working now. I think you are right, the new version has changed something. In fact the change the command line script from convert to magick.

@patriciamarchand
Copy link
Author

will you update Wraith to support the new version of ImageMagick?

@krelde
Copy link

krelde commented Sep 8, 2016

When installing ImageMagick 7 make sure to check "Install legacy utilities"
image

@ChrisBAshton
Copy link
Contributor

Closing this issue - keeping track of it in #459 instead.

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

3 participants