<div>I'm trying to open a file that is in database but I got this error message instead</div> <div><STRONG></STRONG> </div> <div><STRONG>coercing to Unicode: need string or buffer, instance found</STRONG></div> <div> </div> <div>I don't quite understand why. My code looks like this</div> <div> </div> <div>def imageSetup(self, dataID, REQUEST):<BR> from StringIO import StringIO</div> <div> </div> <div> # Get the original image and data in memory and open the file<BR> imageData=getattr(self, dataID)<BR> imageDataFile=StringIO(str(imageData.data))</div> <div> tfw = open(imageDataFile, "r")</div> <div> </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> </div> <div>I call this method using </div> <div>< dtml-call
"imageSetup(textFile, REQUEST)" ></div> <div> </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.