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

translation missing: en.errors.messages.mini_magick_processing_error #1486

Closed
marcusramberg opened this Issue Oct 26, 2014 · 31 comments

Comments

Projects
None yet
@marcusramberg

marcusramberg commented Oct 26, 2014

I've got some minimagick issue, but I can't get to the actual error because of a localization error? Shouldn't the module just fall back to the default locale (English?) if there isn't any translation for the set locale?

Exception CarrierWave::ProcessingError -> translation missing: en.errors.messages.mini_magick_processing_error
   /Users/marcus/.rvm/gems/ruby-2.1.2/gems/carrierwave-0.8.0/lib/carrierwave/processing/mini_magick.rb:264:in `rescue in manipulate!'
   /Users/marcus/.rvm/gems/ruby-2.1.2/gems/carrierwave-0.8.0/lib/carrierwave/processing/mini_magick.rb:258:in `manipulate!'
@bensie

This comment has been minimized.

Show comment
Hide comment
@bensie

bensie Nov 19, 2014

Member

Please update your gem and try again. There is an English translation for mini_magick_processing_error:

mini_magick_processing_error: "Failed to manipulate with MiniMagick, maybe it is not an image? Original Error: %{e}"

Member

bensie commented Nov 19, 2014

Please update your gem and try again. There is an English translation for mini_magick_processing_error:

mini_magick_processing_error: "Failed to manipulate with MiniMagick, maybe it is not an image? Original Error: %{e}"

@bensie bensie closed this Nov 19, 2014

@coneybeare

This comment has been minimized.

Show comment
Hide comment
@coneybeare

coneybeare Dec 9, 2016

I'm seeing this again on 1.0.0.rc. Have any of the translation paths changed?

coneybeare commented Dec 9, 2016

I'm seeing this again on 1.0.0.rc. Have any of the translation paths changed?

@salmanx

This comment has been minimized.

Show comment
Hide comment
@salmanx

salmanx Jan 17, 2017

I have also got the same error. But installing imagemagick helped me to get rid of this. offical doc also suggest to install imagemagick before install minimagic and carrierwave.

salmanx commented Jan 17, 2017

I have also got the same error. But installing imagemagick helped me to get rid of this. offical doc also suggest to install imagemagick before install minimagic and carrierwave.

@Advice-Dog

This comment has been minimized.

Show comment
Hide comment
@Advice-Dog

Advice-Dog Jan 21, 2017

I'm getting the same error when trying to include MiniMagick and use the default thumbnail block.

If I comment it back out, it works fine.

include CarrierWave::MiniMagick
...
version :thumb do
    process resize_to_fit: [64, 64]
end

Advice-Dog commented Jan 21, 2017

I'm getting the same error when trying to include MiniMagick and use the default thumbnail block.

If I comment it back out, it works fine.

include CarrierWave::MiniMagick
...
version :thumb do
    process resize_to_fit: [64, 64]
end
@salmanx

This comment has been minimized.

Show comment
Hide comment
@salmanx

salmanx Jan 21, 2017

salmanx commented Jan 21, 2017

@Advice-Dog

This comment has been minimized.

Show comment
Hide comment
@Advice-Dog

Advice-Dog Jan 21, 2017

I have ImageMagick installed, and it doesn't fail on bundle install, it's only failing when attempting to actually calling resize_to_fit. But the error says it's missing a translation, even though I can see the translation within the .yml file.

Advice-Dog commented Jan 21, 2017

I have ImageMagick installed, and it doesn't fail on bundle install, it's only failing when attempting to actually calling resize_to_fit. But the error says it's missing a translation, even though I can see the translation within the .yml file.

@salmanx

This comment has been minimized.

Show comment
Hide comment
@salmanx

salmanx Jan 21, 2017

salmanx commented Jan 21, 2017

@Advice-Dog

This comment has been minimized.

Show comment
Hide comment
@Advice-Dog

Advice-Dog Jan 21, 2017

resize_to_fill also doesn't work. Same error about missing the translation.

Advice-Dog commented Jan 21, 2017

resize_to_fill also doesn't work. Same error about missing the translation.

@salmanx

This comment has been minimized.

Show comment
Hide comment
@salmanx

salmanx Jan 21, 2017

using windows? I am not sure why it's not working but it's working fine in my ubuntu. You should ask someone experienced here or stack overflow.

salmanx commented Jan 21, 2017

using windows? I am not sure why it's not working but it's working fine in my ubuntu. You should ask someone experienced here or stack overflow.

@Advice-Dog

This comment has been minimized.

Show comment
Hide comment
@Advice-Dog

Advice-Dog Jan 21, 2017

Yes, I'm running Windows 10. I don't know either, but just thought I'd add in more steps on reproducing the issue.

Advice-Dog commented Jan 21, 2017

Yes, I'm running Windows 10. I don't know either, but just thought I'd add in more steps on reproducing the issue.

@gichuru

This comment has been minimized.

Show comment
Hide comment
@gichuru

gichuru Jan 24, 2017

This was a real pain for a couple of days. I managed to solve it by reinstalling the carrierwave gem again

  1. Go to your gemfile, delete gem 'carrierwave'
  2. Run bundle install
  3. Go back to gem file and add gem 'carrierwave'
  4. Run bundle install
  5. Run rails s
  6. Add a new image.

Best of luck!

gichuru commented Jan 24, 2017

This was a real pain for a couple of days. I managed to solve it by reinstalling the carrierwave gem again

  1. Go to your gemfile, delete gem 'carrierwave'
  2. Run bundle install
  3. Go back to gem file and add gem 'carrierwave'
  4. Run bundle install
  5. Run rails s
  6. Add a new image.

Best of luck!

@Advice-Dog

This comment has been minimized.

Show comment
Hide comment
@Advice-Dog

Advice-Dog Jan 29, 2017

@gichuru
I tried this a few times but still no luck. Even went into Ruby and deleted the gem to force it to fetch a new version, but still seeing the same error.

Advice-Dog commented Jan 29, 2017

@gichuru
I tried this a few times but still no luck. Even went into Ruby and deleted the gem to force it to fetch a new version, but still seeing the same error.

@robert-paul

This comment has been minimized.

Show comment
Hide comment
@robert-paul

robert-paul Feb 1, 2017

@Advice-Dog @marcusramberg

Get this. You have to install imagemagick to your local machine. I don't know why, but when using the carrierwave or mini_magick gem with Rails locally (and not an IDE) it is needed.

You can use bower or whatever you're usually using. I have a macbook so here's the solution for that.

For mac: If you haven't used homebrew before, follow instructions here to install http://brew.sh/
Then on your computer go to utilities, then open Terminal. Enter "brew install imagemagick" (exclude quotation marks).

Hope this helps. Wasted 3 hours today on this. Thought it was a problem with S3.

robert-paul commented Feb 1, 2017

@Advice-Dog @marcusramberg

Get this. You have to install imagemagick to your local machine. I don't know why, but when using the carrierwave or mini_magick gem with Rails locally (and not an IDE) it is needed.

You can use bower or whatever you're usually using. I have a macbook so here's the solution for that.

For mac: If you haven't used homebrew before, follow instructions here to install http://brew.sh/
Then on your computer go to utilities, then open Terminal. Enter "brew install imagemagick" (exclude quotation marks).

Hope this helps. Wasted 3 hours today on this. Thought it was a problem with S3.

@Advice-Dog

This comment has been minimized.

Show comment
Hide comment
@Advice-Dog

Advice-Dog Feb 1, 2017

@dinosaurforest @marcusramberg

I actually already had ImageMagick installed, but decided to try again. I'm using Windows, so I grabbed the "ImageMagick-7.0.4-6-Q16-x64-dll.exe" off of https://www.imagemagick.org/script/binary-releases.php.

Ran the installer, checked every box for optional stuff ( who knows, may help ), and during the install it did pop up with a lot of "This file already exists, overwrite?" Which I accepted all of them.

... and it seems to have worked? I'm not sure what's changed, but it seems to upload without error, and checking there is a thumbnail generated.

Thanks.

Advice-Dog commented Feb 1, 2017

@dinosaurforest @marcusramberg

I actually already had ImageMagick installed, but decided to try again. I'm using Windows, so I grabbed the "ImageMagick-7.0.4-6-Q16-x64-dll.exe" off of https://www.imagemagick.org/script/binary-releases.php.

Ran the installer, checked every box for optional stuff ( who knows, may help ), and during the install it did pop up with a lot of "This file already exists, overwrite?" Which I accepted all of them.

... and it seems to have worked? I'm not sure what's changed, but it seems to upload without error, and checking there is a thumbnail generated.

Thanks.

@celsoMartins

This comment has been minimized.

Show comment
Hide comment
@celsoMartins

celsoMartins Feb 18, 2017

complementing @dinosaurforest excellent answer, reinstall will do the work too..

celsoMartins commented Feb 18, 2017

complementing @dinosaurforest excellent answer, reinstall will do the work too..

@robert-paul

This comment has been minimized.

Show comment
Hide comment
@robert-paul

robert-paul Feb 19, 2017

@celsoMartins Was debating whether to propose adding this to the documentation. I think anyone using the carrierwave and mini_magick gem in the development environment on their local machine would need to install imagemagick to their local computer, because the gem relies on a specific C dependency. Would be useful to know. What are your thoughts? Too much?

robert-paul commented Feb 19, 2017

@celsoMartins Was debating whether to propose adding this to the documentation. I think anyone using the carrierwave and mini_magick gem in the development environment on their local machine would need to install imagemagick to their local computer, because the gem relies on a specific C dependency. Would be useful to know. What are your thoughts? Too much?

@jrothrock

This comment has been minimized.

Show comment
Hide comment
@jrothrock

jrothrock Mar 1, 2017

I'm currently having this issue in production. I'm using Ubuntu and have purged and reinstalled imagemagick a few times. Mini magic is 4.6.0. I've brought this up over at minimagic, but I'm not sure if this is minimagic or carrierwave: minimagick/minimagick#402. Here are the errors I'm getting:

MiniMagick::Invalid (`identify /tmp/mini_magick20170301-15568-abuqr9.mov` failed with error:
identify: delegate failed `"ffmpeg" -v -1 -i "%i" -vframes %S -vcodec pam -an -f rawvideo -y "%u.pam" 2> "%Z"' @ error/delegate.c/InvokeDelegate/1310.
identify: unable to open image `/tmp/magick-15578WTub7KbBHjoR.pam': No such file or directory @ error/blob.c/OpenBlob/2712.

Edit: turns out I didn't have ffmpeg installed

jrothrock commented Mar 1, 2017

I'm currently having this issue in production. I'm using Ubuntu and have purged and reinstalled imagemagick a few times. Mini magic is 4.6.0. I've brought this up over at minimagic, but I'm not sure if this is minimagic or carrierwave: minimagick/minimagick#402. Here are the errors I'm getting:

MiniMagick::Invalid (`identify /tmp/mini_magick20170301-15568-abuqr9.mov` failed with error:
identify: delegate failed `"ffmpeg" -v -1 -i "%i" -vframes %S -vcodec pam -an -f rawvideo -y "%u.pam" 2> "%Z"' @ error/delegate.c/InvokeDelegate/1310.
identify: unable to open image `/tmp/magick-15578WTub7KbBHjoR.pam': No such file or directory @ error/blob.c/OpenBlob/2712.

Edit: turns out I didn't have ffmpeg installed

@ruimigueltrigo

This comment has been minimized.

Show comment
Hide comment
@ruimigueltrigo

ruimigueltrigo Mar 2, 2017

Give up on Windows ruby server. Too much problems. I switched to Ubuntu-like operative system and ran:
apt-get install imagemagick

That's all it took to work.

btw: using minimagick gem

ruimigueltrigo commented Mar 2, 2017

Give up on Windows ruby server. Too much problems. I switched to Ubuntu-like operative system and ran:
apt-get install imagemagick

That's all it took to work.

btw: using minimagick gem

@aswan-zz

This comment has been minimized.

Show comment
Hide comment
@aswan-zz

aswan-zz Mar 5, 2017

Question about this - does installing imagemagick just fix the underlying error or does it somehow also fix the problem with missing translations? I assume it's the first, in which case what is the fix for the missing error translations in minimagick?

aswan-zz commented Mar 5, 2017

Question about this - does installing imagemagick just fix the underlying error or does it somehow also fix the problem with missing translations? I assume it's the first, in which case what is the fix for the missing error translations in minimagick?

@ruimigueltrigo

This comment has been minimized.

Show comment
Hide comment
@ruimigueltrigo

ruimigueltrigo Mar 5, 2017

@aswan-zz what is the underlying problem?

ruimigueltrigo commented Mar 5, 2017

@aswan-zz what is the underlying problem?

@aswan-zz

This comment has been minimized.

Show comment
Hide comment
@aswan-zz

aswan-zz Mar 5, 2017

@ruimigueltrigo -- Well the underlying problem appears to be that a processing error is thrown if imagemagick isn't installed or accessible on the host. A second problem seems to be that mini-magick throws an error "translation missing: en.errors.messages.mini_magick_processing_error", which makes finding the source of the underlying error more difficult.

I could be wrong about this though because I'm still trying to figure it out. I have imagemagick installed and it seems to be working, but I still get the "translation missing: en.errors.messages.mini_magick_processing_error" message and the upload/processing of the image fails. I'm currently going through the source code of mini_magick trying to figure out where the error is getting thrown.

aswan-zz commented Mar 5, 2017

@ruimigueltrigo -- Well the underlying problem appears to be that a processing error is thrown if imagemagick isn't installed or accessible on the host. A second problem seems to be that mini-magick throws an error "translation missing: en.errors.messages.mini_magick_processing_error", which makes finding the source of the underlying error more difficult.

I could be wrong about this though because I'm still trying to figure it out. I have imagemagick installed and it seems to be working, but I still get the "translation missing: en.errors.messages.mini_magick_processing_error" message and the upload/processing of the image fails. I'm currently going through the source code of mini_magick trying to figure out where the error is getting thrown.

@ruimigueltrigo

This comment has been minimized.

Show comment
Hide comment
@ruimigueltrigo

ruimigueltrigo Mar 5, 2017

Are you using minimagick or imagemagick gem?

ruimigueltrigo commented Mar 5, 2017

Are you using minimagick or imagemagick gem?

@jrothrock

This comment has been minimized.

Show comment
Hide comment
@jrothrock

jrothrock Mar 5, 2017

@aswan-zz I was also having that issue. Carrierwave swallows the error from minimagic. Read this issue over at minimagic to see how to enable error logging. You may just need to download ffmpeg.

jrothrock commented Mar 5, 2017

@aswan-zz I was also having that issue. Carrierwave swallows the error from minimagic. Read this issue over at minimagic to see how to enable error logging. You may just need to download ffmpeg.

@jrothrock

This comment has been minimized.

Show comment
Hide comment
@jrothrock

jrothrock Apr 19, 2017

I ran into this issue again, and realized that I had a minimagic process running in an uploader it shouldn't have been in

jrothrock commented Apr 19, 2017

I ran into this issue again, and realized that I had a minimagic process running in an uploader it shouldn't have been in

@nunommc

This comment has been minimized.

Show comment
Hide comment
@nunommc

nunommc Apr 28, 2017

I see this issue in current version 1.0.0. I realized that in the code the I18n.load_path is being added only on the spec_helper.rb .. shouldn't it be loaded by carrierwave.rb instead?

nunommc commented Apr 28, 2017

I see this issue in current version 1.0.0. I realized that in the code the I18n.load_path is being added only on the spec_helper.rb .. shouldn't it be loaded by carrierwave.rb instead?

@mcansky

This comment has been minimized.

Show comment
Hide comment
@mcansky

mcansky Sep 8, 2017

any update / fix on this issue ?

mcansky commented Sep 8, 2017

any update / fix on this issue ?

@mcansky

This comment has been minimized.

Show comment
Hide comment
@mcansky

mcansky Sep 8, 2017

after trying different things ... I managed to get to the bottom of the affair. Here follows the gist of it.

As the translations were missing (or unaccessible to CW) I followed a hint from another issue : #1729 and pasted the bunch of translations (french but you could do the same with a bunch of english ones too if your locale is :en, etc). To add those, go paste (or type something in) them nicely in your config/locales/[lang].yml . The main point here is to give carrierwave and rails something to print out rather than raise an exception on the missing translation for another exception.

As I wanted to get as close to MiniMagick as possible I directly worked with the uploader :

[3] pry(main)> pic_up = PictureUploader.new
=> #<PictureUploader:0x007fc090032818 @model=nil, @mounted_as=nil>
[4] pry(main)> pic_up.cache!(File.open("#{Rails.root}/public/images/products/#{_name}_170.png"))
D, [2017-09-08T16:10:24.987245 #6255] DEBUG -- : [0.02s] identify /var/folders/by/r_tpf47x3qs3jqx2tcc_7g5h0000gn/T/mini_magick20170908-6255-ltym2n.png
CarrierWave::ProcessingError: La manipulation d'image avec MiniMagick a échoué. Peut-être que ce n'est pas une image ? Erreur originale: `identify /var/folders/by/r_tpf47x3qs3jqx2tcc_7g5h0000gn/T/mini_magick20170908-6255-ltym2
n.png` failed with error:
identify: unable to load module '/usr/local/Cellar/imagemagick/7.0.5-6/lib/ImageMagick//modules-Q16HDRI/coders/png.la': file not found @ error/module.c/OpenModule/1266.
identify: no decode delegate for this image format `PNG' @ error/constitute.c/ReadImage/509.
from /Users/ange/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/carrierwave-1.1.0/lib/carrierwave/processing/mini_magick.rb:307:in `rescue in manipulate!'
[11] pry(main)>

The direct error message for CW is in french but what interest us is in english as part of the original (read 'mini magick') :

identify /var/folders/by/r_tpf47x3qs3jqx2tcc_7g5h0000gn/T/mini_magick20170908-6255-ltym2
n.png` failed with error:
identify: unable to load module '/usr/local/Cellar/imagemagick/7.0.5-6/lib/ImageMagick//modules-Q16HDRI/coders/png.la': file not found @ error/module.c/OpenModule/1266.
identify: no decode delegate for this image format `PNG' @ error/constitute.c/ReadImage/509.
from /Users/ange/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/carrierwave-1.1.0/lib/carrierwave/processing/mini_magick.rb:307:in `rescue in manipulate!'

"Gasp"

That directed me to Homebrew/legacy-homebrew#14325 which basically points to a badly linked up libpng.

To fix this you just need to play with your package manager (example using homebrew) :

# brew uninstall imagemagick; brew install imagemagick; brew install libpng; brew unlink libpng ; brew link libpng

That fixed it for me. 🚀

mcansky commented Sep 8, 2017

after trying different things ... I managed to get to the bottom of the affair. Here follows the gist of it.

As the translations were missing (or unaccessible to CW) I followed a hint from another issue : #1729 and pasted the bunch of translations (french but you could do the same with a bunch of english ones too if your locale is :en, etc). To add those, go paste (or type something in) them nicely in your config/locales/[lang].yml . The main point here is to give carrierwave and rails something to print out rather than raise an exception on the missing translation for another exception.

As I wanted to get as close to MiniMagick as possible I directly worked with the uploader :

[3] pry(main)> pic_up = PictureUploader.new
=> #<PictureUploader:0x007fc090032818 @model=nil, @mounted_as=nil>
[4] pry(main)> pic_up.cache!(File.open("#{Rails.root}/public/images/products/#{_name}_170.png"))
D, [2017-09-08T16:10:24.987245 #6255] DEBUG -- : [0.02s] identify /var/folders/by/r_tpf47x3qs3jqx2tcc_7g5h0000gn/T/mini_magick20170908-6255-ltym2n.png
CarrierWave::ProcessingError: La manipulation d'image avec MiniMagick a échoué. Peut-être que ce n'est pas une image ? Erreur originale: `identify /var/folders/by/r_tpf47x3qs3jqx2tcc_7g5h0000gn/T/mini_magick20170908-6255-ltym2
n.png` failed with error:
identify: unable to load module '/usr/local/Cellar/imagemagick/7.0.5-6/lib/ImageMagick//modules-Q16HDRI/coders/png.la': file not found @ error/module.c/OpenModule/1266.
identify: no decode delegate for this image format `PNG' @ error/constitute.c/ReadImage/509.
from /Users/ange/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/carrierwave-1.1.0/lib/carrierwave/processing/mini_magick.rb:307:in `rescue in manipulate!'
[11] pry(main)>

The direct error message for CW is in french but what interest us is in english as part of the original (read 'mini magick') :

identify /var/folders/by/r_tpf47x3qs3jqx2tcc_7g5h0000gn/T/mini_magick20170908-6255-ltym2
n.png` failed with error:
identify: unable to load module '/usr/local/Cellar/imagemagick/7.0.5-6/lib/ImageMagick//modules-Q16HDRI/coders/png.la': file not found @ error/module.c/OpenModule/1266.
identify: no decode delegate for this image format `PNG' @ error/constitute.c/ReadImage/509.
from /Users/ange/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/carrierwave-1.1.0/lib/carrierwave/processing/mini_magick.rb:307:in `rescue in manipulate!'

"Gasp"

That directed me to Homebrew/legacy-homebrew#14325 which basically points to a badly linked up libpng.

To fix this you just need to play with your package manager (example using homebrew) :

# brew uninstall imagemagick; brew install imagemagick; brew install libpng; brew unlink libpng ; brew link libpng

That fixed it for me. 🚀

@tomprats

This comment has been minimized.

Show comment
Hide comment
@tomprats

tomprats Sep 10, 2017

Contributor

What fixed my problem was updating Xcode. I have no idea what it actually updated, but I guess it would be a dependency of MiniMagick. That's the underlying problem, but the translation part probably still exists

Contributor

tomprats commented Sep 10, 2017

What fixed my problem was updating Xcode. I have no idea what it actually updated, but I guess it would be a dependency of MiniMagick. That's the underlying problem, but the translation part probably still exists

@pughpugh

This comment has been minimized.

Show comment
Hide comment
@pughpugh

pughpugh Sep 11, 2017

In regards to the translations, the readme does seem to suggest you need to manually add some translations to your locale file. The documentation perhaps has got out of sync with the actual locales needed. As @mcansky indicated, the error is much more obvious at that point.

pughpugh commented Sep 11, 2017

In regards to the translations, the readme does seem to suggest you need to manually add some translations to your locale file. The documentation perhaps has got out of sync with the actual locales needed. As @mcansky indicated, the error is much more obvious at that point.

@bater

This comment has been minimized.

Show comment
Hide comment
@bater

bater Nov 7, 2017

After I run brew upgrade imagemagick and update to imagemagick 7.0.7-10, everything works fine.

Thanks everyone.

bater commented Nov 7, 2017

After I run brew upgrade imagemagick and update to imagemagick 7.0.7-10, everything works fine.

Thanks everyone.

@goxr3plus

This comment has been minimized.

Show comment
Hide comment
@goxr3plus

goxr3plus Jan 4, 2018

@gichuru

  1. I installed ImageMagick on Windows 10.
  2. Opened a new command line after the installation
  3. Followed your steps
  4. Magic happened!

magic

goxr3plus commented Jan 4, 2018

@gichuru

  1. I installed ImageMagick on Windows 10.
  2. Opened a new command line after the installation
  3. Followed your steps
  4. Magic happened!

magic

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