Message1372

Author leouserz
Recipients
Date 2006-12-15.15:39:36
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
in testing an application I found that the javapath module is not excepting unicode objects.  This means that this type of code:

a = unicode("/home/myhome")
import os
os.path.abspath(a)

is throwing an exception because of this code in javapath:
def _tostr(s, method):

    if isinstance(s, "".__class__):

        return s

    import org

    raise TypeError, "%s() argument must be a string object, not %s" % (

                method, org.python.core.Py.safeRepr(s))



the os.path.abspath call works on python.  Note, it is just not the abspath call that bombs.  Any method that interoperates with _tostr and uses a unicode will fail as well.

History
Date User Action Args
2008-02-20 17:17:38adminlinkissue1616493 messages
2008-02-20 17:17:38admincreate