rvdz / hapycolor

Generates beautiful color palettes from images
MIT License
3 stars 0 forks source link

Big Branch #1

Closed nyancol closed 6 years ago

nyancol commented 6 years ago

TODO:

rvdz commented 6 years ago

An idea about this ? File "/home/robin/hapycolor/src/color_filter.py", line 194, in __is_in_saturated_area return Y[0] < y and y < Y[1] IndexError: list index out of range

To reproduce error: python3 getcolors.py -f firewatch.jpg

nyancol commented 6 years ago

Can you upload the image?

rvdz commented 6 years ago

I have got another bug when launching getcolors.py with python3.5 related to the package colormath. Full log:

Traceback (most recent call last):
  File "src/getcolors.py", line 3, in <module>
    from color_extractor import ColorExtractor
  File "/user/3/.base/vincenro/home/hapycolor/src/color_extractor.py", line 3, in <module>
    import color_reducer
  File "/user/3/.base/vincenro/home/hapycolor/src/color_reducer.py", line 3, in <module>
    from colormath.color_conversions import convert_color
  File "/user/3/vincenro/.local/lib/python3.5/site-packages/colormath/color_conversions.py", line 167, in <module>
    def Spectral_to_XYZ(cobj, illuminant_override=None, *args, **kwargs):
  File "/user/3/vincenro/.local/lib/python3.5/site-packages/colormath/color_conversions.py", line 159, in decorator
    _conversion_manager.add_type_conversion(start_type, target_type, f)
  File "/user/3/vincenro/.local/lib/python3.5/site-packages/colormath/color_conversions.py", line 125, in add_type_conversion
    self.conversion_graph.add_edge(start_type, target_type, {'conversion_function': conversion_function})
TypeError: add_edge() takes 3 positional arguments but 4 were given

After further analysis the bug seems to come from a package named networkx used by colormath and independent from hapycolor. Maybe the installation of colormath went wrong, I did it using pip3.5.

On a side note, it would be great to edit the main README to know how to properly install all the necessary packages.

EDIT : I found a way to solve the package compatibility issue by downgrading the version of networkx to 1.11 (former was 2.0): pip3.5 install networkx==1.11

rvdz commented 6 years ago

Another issue under Linux due to the Makefile:

cc1plus: warning: unrecognized gcc debugging option: y [enabled by default]
cc1plus: warning: unrecognized gcc debugging option: n [enabled by default]
cc1plus: warning: unrecognized gcc debugging option: m [enabled by default]
cc1plus: warning: unrecognized gcc debugging option: i [enabled by default]
cc1plus: warning: unrecognized gcc debugging option: c [enabled by default]
cc1plus: warning: unrecognized gcc debugging option: l [enabled by default]
cc1plus: warning: unrecognized gcc debugging option: i [enabled by default]
cc1plus: warning: unrecognized gcc debugging option: b [enabled by default]
/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: error: ld returned 1 exit status
make: *** [libcolor_reducer.so] Error 1
Traceback (most recent call last):
  File "getcolors.py", line 27, in <module>
    extractor = ColorExtractor(args["file"], num_colors=200)
  File "/user/3/.base/vincenro/home/hapycolor/src/color_extractor.py", line 13, in __init__
    self.cr = color_reducer.ColorReducer()
  File "/user/3/.base/vincenro/home/hapycolor/src/color_reducer.py", line 20, in __init__
    self.lib = cdll.LoadLibrary("./libcolor_reducer.so")
  File "/usr/lib64/python3.5/ctypes/__init__.py", line 424, in LoadLibrary
    return self._dlltype(name)
  File "/usr/lib64/python3.5/ctypes/__init__.py", line 346, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: ./libcolor_reducer.so: cannot open shared object file: No such file or directory