Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Post History

#2: Post edited by user avatar Trilarion‭ · 2022-01-04T17:06:06Z (over 2 years ago)
  • I ran tests (`bin/rails test`) and got
  • ```
  • Error:
  • AdvertisementControllerTest#test_image_paths_should_return_png:
  • Magick::ImageMagickError: no decode delegate for this image format `' @ error/constitute.c/ReadImage/572
  • app/helpers/advertisements/codidact_helper.rb:23:in `annotate'
  • app/helpers/advertisements/codidact_helper.rb:23:in `block in codidact_ad'
  • config/initializers/namespaced_cache.rb:11:in `block (2 levels) in <class:NamespacedEnvCache>'
  • app/helpers/advertisements/codidact_helper.rb:8:in `codidact_ad'
  • app/controllers/advertisement_controller.rb:14:in `codidact'
  • test/controllers/advertisement_controller_test.rb:16:in `block (2 levels) in <class:AdvertisementControllerTest>'
  • test/controllers/advertisement_controller_test.rb:15:in `each'
  • test/controllers/advertisement_controller_test.rb:15:in `block in <class:AdvertisementControllerTest>'
  • ```
  • Version of ImageMagick is 7.1.0-19. It might be related this [Stripe::AuthenticationError](https://collab.codidact.org/posts/285410) because it happens in the AdvertisementControllerTest and on Circle CI, the tests seem to run fine.
  • I ran tests (`bin/rails test`) and got
  • ```
  • Error:
  • AdvertisementControllerTest#test_image_paths_should_return_png:
  • Magick::ImageMagickError: no decode delegate for this image format `' @ error/constitute.c/ReadImage/572
  • app/helpers/advertisements/codidact_helper.rb:23:in `annotate'
  • app/helpers/advertisements/codidact_helper.rb:23:in `block in codidact_ad'
  • config/initializers/namespaced_cache.rb:11:in `block (2 levels) in <class:NamespacedEnvCache>'
  • app/helpers/advertisements/codidact_helper.rb:8:in `codidact_ad'
  • app/controllers/advertisement_controller.rb:14:in `codidact'
  • test/controllers/advertisement_controller_test.rb:16:in `block (2 levels) in <class:AdvertisementControllerTest>'
  • test/controllers/advertisement_controller_test.rb:15:in `each'
  • test/controllers/advertisement_controller_test.rb:15:in `block in <class:AdvertisementControllerTest>'
  • ```
  • Version of ImageMagick is 7.1.0-19 and was built from source. It might be related this [Stripe::AuthenticationError](https://collab.codidact.org/posts/285410) because it happens in the AdvertisementControllerTest and on Circle CI, the tests seem to run fine.
#1: Initial revision by user avatar Trilarion‭ · 2022-01-04T17:01:37Z (over 2 years ago)
How to solve Magick::ImageMagickError: no decode delegate for this image format in AdvertisementControllerTest#test_image_paths_should_return_png
I ran tests (`bin/rails test`) and got

```
Error:
AdvertisementControllerTest#test_image_paths_should_return_png:
Magick::ImageMagickError: no decode delegate for this image format `' @ error/constitute.c/ReadImage/572
    app/helpers/advertisements/codidact_helper.rb:23:in `annotate'
    app/helpers/advertisements/codidact_helper.rb:23:in `block in codidact_ad'
    config/initializers/namespaced_cache.rb:11:in `block (2 levels) in <class:NamespacedEnvCache>'
    app/helpers/advertisements/codidact_helper.rb:8:in `codidact_ad'
    app/controllers/advertisement_controller.rb:14:in `codidact'
    test/controllers/advertisement_controller_test.rb:16:in `block (2 levels) in <class:AdvertisementControllerTest>'
    test/controllers/advertisement_controller_test.rb:15:in `each'
    test/controllers/advertisement_controller_test.rb:15:in `block in <class:AdvertisementControllerTest>'
```

Version of ImageMagick is 7.1.0-19. It might be related this [Stripe::AuthenticationError](https://collab.codidact.org/posts/285410) because it happens in the AdvertisementControllerTest and on Circle CI, the tests seem to run fine.