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

extract_histogram_data is broken Enumerable not implemented for nil of type Atom #93

Closed
bunnymatic opened this issue Jan 27, 2021 · 2 comments

Comments

@bunnymatic
Copy link
Contributor

In a recent mod, it appears that extract_histogram_data no longer works. When I run tests (on a project that includes mogrify), I get the following error

     ** (Protocol.UndefinedError) protocol Enumerable not implemented for nil of type Atom. This protocol is implemented for the following type(s): HashSet, Range, Map, Function, List, Stream, Date.Range, HashDict, GenEvent.Stream, MapSet, File.Stream, IO.Stream
     code: assert @fixture |> ImageProcessor.Impl.compute_theme(:simple_sort) ==
     stacktrace:
       (elixir 1.11.2) lib/enum.ex:1: Enumerable.impl_for!/1
       (elixir 1.11.2) lib/enum.ex:141: Enumerable.reduce/3
       (elixir 1.11.2) lib/enum.ex:3461: Enum.map/2
       (mogrify 0.8.0) lib/mogrify.ex:127: Mogrify.extract_histogram_data/1
...

I'm going to look into the issue and hopefully can have a PR up soon to address this.

I wanted to just document the fact that it's out there in case someone else has noticed issues.

@bunnymatic
Copy link
Contributor Author

bunnymatic commented Jan 27, 2021

This appears to be related to histogram entries from ImageMagick like

    339: (3.53463,133.003,221.133) #0485DD srgb(1.38613%,52.1579%,86.7188%)

I think the regex is not matching the % signs or the decimals in the rgb values

@bunnymatic
Copy link
Contributor Author

Closed with #94

This issue was closed.
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

1 participant