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

Fix exception when autotagging animated_gifs #2943

Merged
merged 1 commit into from Mar 27, 2017

Conversation

evazion
Copy link
Member

@evazion evazion commented Mar 26, 2017

Fixes an exception caused by the animated_gif autotagger trying to access the gif file, which fails if the file isn't present due to #2500.

This is the lazy fix. The real fix would be to do the autotagging at post creation instead of on post update. This would be a slight change in behavior though, since then it would be possible to remove the animated_gif tag, whereas now you can't.

Magick::ImageMagickError exception raised

    unable to open image `/var/www/danbooru2/releases/20170322212609/public/data/f0e32c0e2d906c4932858866346f98b5.gif': No such file or directory @ error/blob.c/OpenBlob/2712
    app/models/post.rb:177:in `ping'
    app/models/post.rb:177:in `is_animated_gif?'
    app/models/post.rb:684:in `add_automatic_tags'
    app/models/post.rb:638:in `normalize_tags'
    app/controllers/posts_controller.rb:49:in `update'

Fixes this exception caused by the animated_gif autotagger trying to access the
image file, which fails if the image is not hosted on the webserver.

Magick::ImageMagickError exception raised

    unable to open image `/var/www/danbooru2/releases/20170322212609/public/data/f0e32c0e2d906c4932858866346f98b5.gif': No such file or directory @ error/blob.c/OpenBlob/2712
    app/models/post.rb:177:in `ping'
    app/models/post.rb:177:in `is_animated_gif?'
    app/models/post.rb:684:in `add_automatic_tags'
    app/models/post.rb:638:in `normalize_tags'
    app/controllers/posts_controller.rb:49:in `update'
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

Successfully merging this pull request may close these issues.

None yet

2 participants