Open waterboy96 opened 4 years ago
Hi! Looks like you're trying to run javascript code in python. This repo (csgo-c4-hue-node) is written in JavaScript, try this one for Python!: https://github.com/doobix/csgo-c4-hue
On Wed, Mar 11, 2020 at 12:10 PM Waterboy96 notifications@github.com wrote:
Hi,
I am trying to get this to work for my young cousin... I installed Anaconda 2.7, moved the folder and did the hue bridge and stuff. I tried running the two scripts via a notebook and I get the following when running the csgo-c4-hue script:
13 r = requests.get('{}groups/0'.format(HUE_API)) 14 json_data = r.json()
---> 15 lights = json_data['lights'] 16 last_blink_time = None 17 blink_on = True
TypeError: list indices must be integers, not str
Should the python folder be located in a specific directory?
Any help that you could provide would be greatly appreciated.
Best regards
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/doobix/csgo-c4-hue-node/issues/7, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB4PZELMD7HIGGA34MDHQNTRG7OZ7ANCNFSM4LF4Z5OA .
Ah I posted on the wrong repo. I was looking at the JS implementation aswell, but I only tested the python implementation, however I got the files from the python repository.
Hi,
I am trying to get this to work for my young cousin... I installed Anaconda 2.7, moved the folder and did the hue bridge and stuff. I tried running the two scripts via a notebook and I get the following when running the csgo-c4-hue script:
---> 15 lights = json_data['lights'] 16 last_blink_time = None 17 blink_on = True
TypeError: list indices must be integers, not str
Should the python folder be located in a specific directory?
Any help that you could provide would be greatly appreciated.
Best regards