No the problem is exactly the same with StringIO and cStringIO

-Tow
----- Original Message ----- 
From: "Tres Seaver" <[EMAIL PROTECTED]>
Newsgroups: gmane.comp.web.zope.devel
To: "Tor Oskar Wilhelmsen" <[EMAIL PROTECTED]>
Sent: Monday, July 12, 2004 7:01 PM
Subject: Re: StringIO and Zope


> 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 
> (http://docs.python.org/lib/module-cStringIO.html):
> 
> > 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"       http://www.zope.com
> 

_______________________________________________
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )

Reply via email to