I'm trying to open a file that is in database but I got this error message instead
 
coercing to Unicode: need string or buffer, instance found
 
I don't quite understand why. My code looks like this
 
def imageSetup(self, dataID, REQUEST):
    from StringIO import StringIO
 
    # Get the original image and data in memory and open the file
    imageData=getattr(self, dataID)
    imageDataFile=StringIO(str(imageData.data))
    tfw = open(imageDataFile, "r")
 
I upload a text file into ZOPE database and
the file consist of six lines of float point numbers that I want to use with REQUEST.set
 
I call this method using
< dtml-call "imageSetup(textFile, REQUEST)" >
 
can anyone help me... please...
did I made a mistake with this code


Yahoo! Mail
Bring photos to life! New PhotoMail makes sharing a breeze.
_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to