sharkdp / pastel

A command-line tool to generate, analyze, convert and manipulate colors
Apache License 2.0
5.08k stars 102 forks source link

`pick` error #153

Closed ixzh closed 2 years ago

ixzh commented 2 years ago

Hi, I'm having this error when runningpastel pick:

Error while running color picker 'gdbus I install pipette via pip, not helping. how can I get gdbus to work?

sharkdp commented 2 years ago

Looks like this was introduced with #147. I have the same problem actually (should have tested it better). @sigmaSd could you maybe have a look at this? Otherwise, I would revert #147 for now.

@ixzh: the latest release should still work fine

sigmaSd commented 2 years ago

I guess the tool I added is very specific to gnome, I didn't notice when I added it that I made it the highest precedence tool, is it ok to just lower its precedence?

sharkdp commented 2 years ago

@sigmaSd Thank you very much for the prompt response. Lowering the precedence will help. And is something we should probably do. I didn't realize it either during the review.

However, I don't think that's enough. The problem is that gdbus exists on our systems, but the call fails. This is not something that happens with the other color pickers. If they exist, and if we can call them successfully with the version argument and get a proper response, we expect them to succeed.

It seems like for gdbus, we need a more sophisticated workflow. On our machines, it fails with (I'm not using Gnome):

Error: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.Shell.Screenshot was not provided by any .service files

Maybe there is some other call we could run first to see if the call will succeed? Or we simply run a similar command as "version command" and skip gdbus as a picker if that call fails?

sharkdp commented 2 years ago

Closed via #155.