Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Attribute Error
#1
trying to convert an integer tuple to a binary (string) tuple.
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'
Reply


Messages In This Thread
Attribute Error - by Adit99 - Aug-17-2019, 08:59 PM
RE: Attribute Error - by ichabod801 - Aug-17-2019, 09:07 PM
RE: Attribute Error - by Axel_Erfurt - Aug-17-2019, 09:09 PM
RE: Attribute Error - by Adit99 - Aug-18-2019, 06:01 AM
RE: Attribute Error - by wavic - Aug-18-2019, 07:40 AM
RE: Attribute Error - by ichabod801 - Aug-18-2019, 11:44 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Error: audioio has no attribute 'AudioOut' netwrok 3 691 Oct-22-2023, 05:53 PM
Last Post: netwrok
  cx_oracle Error - AttributeError: 'function' object has no attribute 'cursor' birajdarmm 1 2,468 Apr-15-2023, 05:17 PM
Last Post: deanhystad
  Getting 'NoneType' object has no attribute 'find' error when WebScraping with BS Franky77 2 5,322 Aug-17-2021, 05:24 PM
Last Post: Franky77
  Attribute Error received not understood (Please Help) crocolicious 5 2,731 Jun-19-2021, 08:45 PM
Last Post: crocolicious
  error in scapy attribute 'haslayer' evilcode1 5 6,613 Mar-02-2021, 11:19 AM
Last Post: evilcode1
  attribute error instead of correct output MaartenRo 2 2,222 Aug-28-2020, 10:22 AM
Last Post: Larz60+
  attribute error stumped on how to fix it. hank4eva 7 4,844 Aug-11-2020, 04:47 AM
Last Post: hank4eva
  Attribute Error - trying to create a pixel array out of PNG files The_Sarco 1 2,035 Apr-29-2020, 07:10 PM
Last Post: deanhystad
  Attribute Error for Rename / Replace warden89 6 7,992 Jan-07-2020, 06:08 PM
Last Post: warden89
  Reading DBF files from Amazon s3 throwing error - 'int' object has no attribute 'isa abeesm 1 2,951 Sep-22-2019, 05:49 PM
Last Post: ndc85430

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020