0

Python Library Error, rgb_led example code
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Python Library Error, rgb_led example code

by Rev_02 on Mon Jul 08, 2019 9:49 am

I was following the rgb_led.py example code and the tutorial on the learning system, and when I run the code, I get the error that
Code: Select all | TOGGLE FULL SIZE
AttributeError: 'Client' object has no attribute 'toRed'
when trying to convert the hex. I can code my own toRed function, but wondered if there was an easy fix that may have escaped the sample code?

Rev_02
 
Posts: 2
Joined: Mon Jul 08, 2019 9:45 am

Re: Python Library Error, rgb_led example code

by brubell on Mon Jul 08, 2019 10:31 am

The method calls within client.py were changed to to_red, to_blue.:
https://github.com/adafruit/Adafruit_IO ... ent.py#L64

I did not update this example after I modified the method signatures, I'll fix it.

UPDATE: This example has been fixed in `master`

brubell
 
Posts: 494
Joined: Fri Jul 17, 2015 10:33 pm

Re: Python Library Error, rgb_led example code

by Rev_02 on Mon Jul 08, 2019 11:47 am

Ok brilliant, thank you

Rev_02
 
Posts: 2
Joined: Mon Jul 08, 2019 9:45 am

Please be positive and constructive with your questions and comments.