Ahh, that did it, thanks very much. Jon ----- Original Message ----- From: <[EMAIL PROTECTED]> Newsgroups: comp.lang.python To: <python-list@python.org> Sent: Thursday, July 27, 2006 11:19 AM Subject: Re: coercing to Unicode: need string or buffer, NoneType found
> > Jon Bowlas wrote: > >> Here's my script: >> >> results = context.module_retriever().tuples() # call to ZSQLMethod >> converted = [] >> for result in results: >> result = list(result) # make a list from the tuple >> for i in range(len(result)): >> # for each element in the listified tuple, make decode to a >> # unicode from the latin-1 string > > try this: > if result[i] is None: continue > >> result[i] = unicode(result[i], 'latin-1') >> converted.append(tuple(result)) # tuplify again >> return converted > > regards, > Rob > > -- > http://mail.python.org/mailman/listinfo/python-list > -- http://mail.python.org/mailman/listinfo/python-list