From: Updike, Clark <Clark.U<pdike@jh...> - 2004-07-28 20:14:19
Your endRec is null (a.k.a. Jython's None),
and of course the None object doesn't have the encode method.
Find out why your getValue is returning None.
Sent: Thursday, July 08, 2004 7:11 AM
Subject: [Jython-users] Java String to Python string coercion
My jython code calls a java method which returns a String type
I subsequently want to perform an encode on the returned value like so:
However, I receive an error to indicate that the type of what is returned is
not of python "string" type and therefore encode is not a possible operation
AttributeError: 'None' object has no attribute 'encode'
Having looked at the documentation under "Accessing Java from Jython" I
would have thought that the coercion from Java type "java.lang.String" to
Python type "string" would have been automatic. But this doesn't seem to be
happening here. Can anyone explain ?
Get latest updates about Open Source Projects, Conferences and News.