Message1372
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.
|
|
Date |
User |
Action |
Args |
2008-02-20 17:17:38 | admin | link | issue1616493 messages |
2008-02-20 17:17:38 | admin | create | |
|