G213Colors icon indicating copy to clipboard operation
G213Colors copied to clipboard

`g213colors-gui -t` errors out if you have only a G203

Open ssokolow opened this issue 4 years ago • 3 comments

Like the title says, running g213colors-gui -t (which the systemd task wraps) dies with this error if you only have a G203:

Traceback (most recent call last):
  File "/usr/bin/g213colors-gui", line 166, in <module>
    myG.connectG("G213")
  File "/usr/bin/G213Colors.py", line 68, in connectG
    raise ValueError("USB device not found!")
ValueError: USB device not found!

I had to edit line 173 in /usr/bin/g213colors-gui from myG.connectG("G213") to myG.connectG("G203") to get it to run without erroring out.

ssokolow avatar Dec 20 '19 23:12 ssokolow

the G203 most likely has different product IDs, if you can find out the ids, you could potentially get it to work...

SebiTimeWaster avatar Feb 05 '21 05:02 SebiTimeWaster

@SebiTimeWaster This fork specifically lists support for the G203 in the README, the other features work, and, if you edit that one line, -t works too. That's why I opened the bug.

The code is there and functional... it's just that the implementation of the -t switch hard-codes an assumption that it's going to be dealing with a G213.

(Source: I've been using my locally patched copy of it with my G203 without issue since I opened this bug.)

myG.connectG("G213") or myG.connectG("G203") indexes into this dict:

idProduct      = {"G213": 0xc336, # The id of the G213
                  "G203": 0xc084} # The id of the G203

ssokolow avatar Feb 05 '21 09:02 ssokolow

didn't know that.

SebiTimeWaster avatar Feb 05 '21 16:02 SebiTimeWaster