Re: AttributeError: 'tuple' object has no attribute 'encode'

2007-04-05 Thread Paul Boddie
erikcw wrote: > > Here is the full error: (sorry) No problem! It's easier to comment with these details... > Traceback (most recent call last): > File "/home/erik/Desktop/wa.py", line 178, in ? > curHandler.walkData() > File "/home/erik/Desktop/wa.py", line 91, in walkData > sql = """INSERT INT

Re: AttributeError: 'tuple' object has no attribute 'encode'

2007-04-05 Thread Paul Boddie
Lenard Lindstrom wrote: > > > > I'm trying to build a SQL string > > > > sql = """INSERT INTO ag ('cid', 'ag', 'test') VALUES(%i, %s, %d)""", > > (cid, ag, self.data[parent][child]['results']['test']) > > I am guessing you want the string formatting operator here: > > sql = """...""" % (cid, ...)

Re: AttributeError: 'tuple' object has no attribute 'encode'

2007-04-05 Thread Lenard Lindstrom
erikcw wrote: > Hi, > > I'm trying to build a SQL string > > sql = """INSERT INTO ag ('cid', 'ag', 'test') VALUES(%i, %s, %d)""", > (cid, ag, self.data[parent][child]['results']['test']) > I am guessing you want the string formatting operator here: sql = """...""" % (cid, ...) The comma creat

Re: AttributeError: 'tuple' object has no attribute 'encode'

2007-04-05 Thread erikcw
, > > (cid, ag, self.data[parent][child]['results']['test']) > > This makes a tuple, though: the first element is the SQL string; the > second element contains a tuple of parameters. > > > It raises this error: AttributeError: 'tuple' object has no att

Re: AttributeError: 'tuple' object has no attribute 'encode'

2007-04-05 Thread Paul Boddie
uple, though: the first element is the SQL string; the second element contains a tuple of parameters. > It raises this error: AttributeError: 'tuple' object has no attribute > 'encode' What does? I imagine that this error comes from a call to a cursor object's

Re: AttributeError: 'tuple' object has no attribute 'encode'

2007-04-05 Thread erikcw
x27;) VALUES(%i, %s, %d)""", > > (cid, ag, self.data[parent][child]['results']['test']) > > > It raises this error: AttributeError: 'tuple' object has no attribute > > 'encode' > > > Some of the variables are un

Re: AttributeError: 'tuple' object has no attribute 'encode'

2007-04-05 Thread kyosohma
On Apr 5, 10:31 am, "erikcw" <[EMAIL PROTECTED]> wrote: > Hi, > > I'm trying to build a SQL string > > sql = """INSERT INTO ag ('cid', 'ag', 'test') VALUES(%i, %s, %d)""", > (cid, ag, self.data

AttributeError: 'tuple' object has no attribute 'encode'

2007-04-05 Thread erikcw
Hi, I'm trying to build a SQL string sql = """INSERT INTO ag ('cid', 'ag', 'test') VALUES(%i, %s, %d)""", (cid, ag, self.data[parent][child]['results']['test']) It raises this error: AttributeError: 'tup