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

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

Open
AlNexus opened this issue Feb 3, 2023 · 2 comments
Open

Comments

@AlNexus
Copy link

AlNexus commented Feb 3, 2023

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!!

@kiddae
Copy link
Owner

kiddae commented Feb 3, 2023

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.

@AlNexus
Copy link
Author

AlNexus commented Feb 3, 2023

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.

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

2 participants