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
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, ...)
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
,
> > (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
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
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
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
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