Tor Oskar Wilhelmsen wrote:

I have a problem with python 2.3.3 and Zope 2.7.0. When I Execute the
code below, Python just get som unhandled exceptions, and crash? Why?
> Does anyone know???

from cStringIO import StringIO
#pic[3] is a blob in a database
data = pic[3]
fil = StringIO(str(data)) #this line makes Zope and Python crash!!!!

Does the problem go away if you change the import to:

  from StringIO import StringIO

From the cStringIO library documentation (

Unlike the memory files implemented by the StringIO module, those
> provided by this module are not able to accept Unicode strings that
> cannot be encoded as plain ASCII strings.

Tres. -- =============================================================== Tres Seaver [EMAIL PROTECTED] Zope Corporation "Zope Dealers"

Zope-Dev maillist - [EMAIL PROTECTED]
** No cross posts or HTML encoding! **
(Related lists - )

Reply via email to