I'm getting

line 79, in tounicode
return(unicode(s, errors='replace'))
TypeError: decoding Unicode is not supported

from this, under Python 2.7:

def tounicode(s) :
    if type(s) == unicode :
        return(s)
    return(unicode(s, errors='replace'))

That would seem to be impossible.  But it's not.
"s" is generated from the "suds" SOAP client.  The documentation
for "suds" says:

"Suds leverages python meta programming to provide an intuative API for consuming web services. Runtime objectification of types defined in the WSDL is provided without class generation."

I think that somewhere in "suds", they subclass the "unicode" type.
That's almost too cute.

The proper test is

        isinstance(s,unicode)


                                        John Nagle


--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to