This looks like much more of a python question than a MySQL question.. I'll reply offline.
- michael dykman On Sun, Oct 4, 2009 at 2:04 PM, Victor Subervi <victorsube...@gmail.com> wrote: > 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 > -- - michael dykman - mdyk...@gmail.com Don’t worry about people stealing your ideas. If they’re any good, you’ll have to ram them down their throats! Howard Aiken -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=arch...@jab.org