<div>I'm trying to open a file that is in database but I got this error message instead</div>  <div><STRONG></STRONG>&nbsp;</div>  <div><STRONG>coercing to Unicode: need string or buffer, instance found</STRONG></div>  <div>&nbsp;</div>  <div>I don't quite understand why. My code looks like this</div>  <div>&nbsp;</div>  <div>def imageSetup(self, dataID, REQUEST):<BR>&nbsp;&nbsp;&nbsp; from StringIO import StringIO</div>  <div>&nbsp;</div>  <div>&nbsp;&nbsp;&nbsp; # Get the original image and data in memory and open the&nbsp;file<BR>&nbsp;&nbsp;&nbsp; imageData=getattr(self, dataID)<BR>&nbsp;&nbsp;&nbsp; imageDataFile=StringIO(str(imageData.data))</div>  <div>&nbsp;&nbsp;&nbsp; tfw = open(imageDataFile, "r")</div>  <div>&nbsp;</div>  <div>I upload a text file into ZOPE database and</div>  <div>the file consist of six lines of float point numbers that I want to use with REQUEST.set</div>  <div>&nbsp;</div>  <div>I call this method using </div>  <div>&lt; dtml-call
 "imageSetup(textFile, REQUEST)" &gt;</div>  <div>&nbsp;</div>  <div>can anyone help me... please...</div>  <div>did I made a mistake with this code</div><p>
                <hr size=1>Yahoo! Mail<br>
Bring photos to life! <a href="http://pa.yahoo.com/*http://us.rd.yahoo.com/evt=39174/*http://photomail.mail.yahoo.com">New PhotoMail </a> makes sharing a breeze.