read(): 1st argument can't be coerced to byte[]

Diez B. Roggisch nospam-deets at web.de
Tue Mar 2 08:25:07 EST 2004


> 1 response = request.POST() # posts SOAP to the web service  and waits for
> 2                           # response
> 3 instr = response.getInputStream()
> 4 reader = Sax2.Reader()
> 5 doc = reader.fromStream(instr)
> (...)
> 
> Well, at line 5, I get the error:
> 
> read(): 1st argument can't be coerced to byte[]

What is that Sax2 thingy? It looks to me that the fromStream-method passes
the instr to something that expects a byte-array - so you could try to read
all the stuff from instr into an array and pass that.

> Does not seem to be a DOM parsing problem.

how could it, its SAX.....

-- 
Regards,

Diez B. Roggisch



More information about the Python-list mailing list