Hi;
I have the following python code:
      sql = 'insert into products values(%s, %s, %s, %s, %s, %s, %s, %s, %s,
%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s);', (id, name, title,
description, price, bedrooms, bathrooms, conditions, acreage, construction,
location, estate, address, furnished, pic1, pic2, pic3, pic4, pic5, pic6)
      cursor.execute(sql)

which, when printed to screen, gives the following:

insert into products values ('1', 'name1', 'title1', 'descr1', '1.1', '2',
'1', 'New', '1.5', 'new', 'princesse', 'princesse', '123 princesse', 'Not
furnished', '', '', '', '', '', '');

which I can enter into the database directly. However, when I try to do it
through the script, I get the following error:

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

Why is that? There are no tuples here!! Nothing but strings!!
TIA,
Victor

Reply via email to