ImageColorizer icon indicating copy to clipboard operation
ImageColorizer copied to clipboard

ImageColorizer throws an error - "min() arg is an empty sequence"

Open AlNexus opened this issue 2 years ago • 2 comments

So I tried running the command with python .local/bin/ImageColorizer ~/gravityfallscolorized.png ~/tokyonight.png -c ~/tokyonight and it threw out this weird error:

/bin/sh: line 1: colorer: command not found
Traceback (most recent call last):
  File "/home/archnexus/.local/bin/ImageColorizer", line 8, in <module>
    sys.exit(main())
  File "/home/archnexus/.local/lib/python3.10/site-packages/ImageColorizer/__main__.py", line 52, in main
    img_col.generate(args.input, args.output, show=args.show,
  File "/home/archnexus/.local/lib/python3.10/site-packages/ImageColorizer/ClassModule.py", line 129, in generate
    new_color = min(differences)[1]
ValueError: min() arg is an empty sequence

I don't know anything about Python and I don't know what could be causing this error. I also don't know much about Markdown so I apologized if this issue is malformatted. Installed ImageColorizer using ./install.sh by the way image

Here is what my colorscheme file looks like

color0 #414868
color1 #f7768e
color2 #73daca
color3 #e0af68
color4 #7aa2f7
color5 #bb9af7
color6 #7dcfff
color7 #c0caf5
color8 #414868
color9 #f7768e
color10 #73daca
color11 #e0af68
color12 #7aa2f7
color13 #bb9af7
color14 #7dcfff
color15 #c0caf5

Really appreciate your work on this tool!!

AlNexus avatar Feb 03 '23 01:02 AlNexus

Hello,

You have to install colorer to use that option, i.e. have it somewhere in your $PATH. But I'm guessing you haven't set it up to read the .local/bin directory (where pip installs its user-specific modules/programs), so could you check that on your ~/.profile ? Otherwise you might just need to log out and log in again. That will also fix the issue of having to invoke python to run the program.

If that was intentional and you don't want it to touch your $PATH-ready programs I'm open to more flexible suggestions to read colorscheme values from.

kiddae avatar Feb 03 '23 06:02 kiddae

Thanks a lot! That worked. Installed colored and added ~/.local/bin to my PATH. Defined XDG_CONFIG_HOME and XDG_CONFIG_CACHE for colorer to work and it did work! Had read about having to install colorer somewhere before, but I didn't for some reason. Amazing tool by the way! It did an amazing job in this wallpaper.

AlNexus avatar Feb 03 '23 19:02 AlNexus