Aug-17-2019, 08:59 PM
trying to convert an integer tuple to a binary (string) tuple.
getting an Attribute error as follow.
getting an Attribute error as follow.
def __int_to_bin(rgb): r, g, b = rgb.split(' ') return ('{0:08b}'.format(r,), '{0:08b}'.format(g,), '{0:08b}'.format(b,))this is the error
Error:File "C:/Users/adit1/AppData/Local/Programs/Python/Python37-32/Stego/aug17.py", line 12, in __int_to_bin
r, g, b = rgb.split(' ')
AttributeError: 'tuple' object has no attribute 'split'