[Zope-dev] StringIO and Zope

Tor Oskar Wilhelmsen toroskar at chello.no
Mon Jul 12 14:02:02 EDT 2004


Hi
I can't print tracebacks. I'm unfortunatly on a windows system, an whats
happen is tha Python jus quits, with no fault description.

A type(data)  gives me DbiRaw, which is the type of data in the DB

-TOW
----- Original Message ----- 
From: "Tim Peters" <tim.peters at gmail.com>
To: "Tor Oskar Wilhelmsen" <toroskar at chello.no>
Cc: <zope-dev at zope.org>
Sent: Monday, July 12, 2004 7:41 PM
Subject: Re: [Zope-dev] StringIO and Zope


> [Oskar Wilhelmsen]
> > 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?
>
> What are (exactly) the "unhandled exceptions"?  Can you paste in
tracebacks?
>
> > 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!!!!
>
> Since you later said it didn't matter whether you used StringIO or
> cStringIO, it would be helpful to beak that into two lines:
>
> temp = str(data)
> fil = StringIO(temp)
>
> Might also help to print type(data).  Since str() and StringIO() are
> so heavily used, it's unlikely the problem is in either of them.  Most
> likely is a problem in type(data)'s __str__ or __repr__
> implementations.
>




More information about the Zope-Dev mailing list