Message3778

Author amak
Recipients amak
Date 2008-11-12.17:15:08
SpamBayes Score 0.00013963491
Marked as misclassified No
Message-id <1226510108.99.0.442559556531.issue1171@psf.upfronthosting.co.za>
In-reply-to
Content
When trying to create a PyFile from a java.io.InputStream, a TypeError
is created. The following snippet illustrates

# filebug.py -=-=-=-=-=-=-=-=-=-=-=
from java.io import FileInputStream
from org.python.core import PyFile

fis = FileInputStream("error.txt")
pyf = PyFile(fis)
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Which outputs 

Traceback (most recent call last):
  File "filebug.py", line 7, in <module>
    pyf = PyFile(fis)
TypeError: coercing to Unicode: need string, 'javainstance' type found

This bug was introduced sometime between 2.5a3 and 2.5b0.

It was reported by two different modjy users.

http://groups.google.com/group/web2py/browse_thread/thread/c899d456c146e2bc

One of them on Frank's blog

http://fwierzbicki.blogspot.com/2008/10/jython-25-beta0-released.html
History
Date User Action Args
2008-11-12 17:15:09amaksetrecipients: + amak
2008-11-12 17:15:08amaksetmessageid: <1226510108.99.0.442559556531.issue1171@psf.upfronthosting.co.za>
2008-11-12 17:15:08amaklinkissue1171 messages
2008-11-12 17:15:08amakcreate