"TypeError: read-only buffer, None" returned from file.write...

Dag Sunde dag at orion.no
Tue Jun 20 19:01:05 EDT 2000


I have the following code-snippet that retuns a string:

   result = m_XMLDoc.transformNode(xslDoc)

...and the string shows the expected result when printed,
but when I try to save the string to a file with the following
code:

  f = open( outFile, 'w')
  f.write(sBuffer)
  f.close()

I get this error:

Traceback (innermost last):
  File "f:/apache/cgi-bin/getfinalconfirmation.py", line 142, in
saveConfirmedData
    f.write(sBuffer)
TypeError: read-only buffer, None

Can anyone give me a hint?

TIA...

Dag Sunde






More information about the Python-list mailing list