Message9675

Author Arfrever
Recipients Arfrever, zyasoft
Date 2015-03-19.11:39:33
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1426765175.12.0.181845002528.issue2293@psf.upfronthosting.co.za>
In-reply-to
Content
$ cat test.py
# coding: utf-8
import sys
sys.path.append(u"/tmp/ćśź")
print("sys.path[-1]: %r" % sys.path[-1])
import urllib
print(urllib)
$ python2.7 test.py
sys.path[-1]: u'/tmp/\u0107\u015b\u017a'
<module 'urllib' from '/usr/lib64/python2.7/urllib.pyc'>
$ jython2.7 test.py
sys.path[-1]: u'/tmp/\u0107\u015b\u017a'
Traceback (most recent call last):
  File "test.py", line 5, in <module>
    import urllib
  File "/usr/share/jython-2.7/Lib/urllib.py", line 25, in <module>
    import string
  File "/usr/share/jython-2.7/Lib/string.py", line 528, in <module>
    from strop import maketrans, lowercase, uppercase, whitespace
  File "/usr/share/jython-2.7/Lib/string.py", line 528, in <module>
    from strop import maketrans, lowercase, uppercase, whitespace
java.lang.IllegalArgumentException: Cannot create PyString with non-byte value
        at org.python.core.PyString.<init>(PyString.java:64)
        at org.python.core.PyString.<init>(PyString.java:70)
        at org.python.core.PyException.<init>(PyException.java:61)
        at org.python.modules.zipimport.zipimport.ZipImportError(zipimport.java:36)
        at org.python.modules.zipimport.zipimporter.zipimporter___init__(zipimporter.java:122)
        at org.python.modules.zipimport.zipimporter.zipimporter___init__(zipimporter.java:84)
        at org.python.modules.zipimport.zipimporter$exposed___new__.createOfType(Unknown Source)
        at org.python.core.PyOverridableNew.new_impl(PyOverridableNew.java:12)
        at org.python.core.PyType.invokeNew(PyType.java:494)
        at org.python.core.PyType.type___call__(PyType.java:1690)
        at org.python.core.PyType.__call__(PyType.java:1680)
        at org.python.core.PyObject.__call__(PyObject.java:461)
        at org.python.core.imp.getPathImporter(imp.java:479)
        at org.python.core.imp.find_module(imp.java:529)
        at org.python.core.imp.import_next(imp.java:837)
        at org.python.core.imp.import_module_level(imp.java:956)
        at org.python.core.imp.importName(imp.java:1057)
        at org.python.core.ImportFunction.__call__(__builtin__.java:1280)
        at org.python.core.PyObject.__call__(PyObject.java:431)
        at org.python.core.__builtin__.__import__(__builtin__.java:1232)
        at org.python.core.imp.importFromAs(imp.java:1151)
        at org.python.core.imp.importFrom(imp.java:1127)
        at string$py.f$0(/usr/share/jython-2.7/Lib/string.py:543)
        at string$py.call_function(/usr/share/jython-2.7/Lib/string.py)
        at org.python.core.PyTableCode.call(PyTableCode.java:167)
        at org.python.core.PyCode.call(PyCode.java:18)
        at org.python.core.imp.createFromCode(imp.java:435)
        at org.python.core.imp.createFromPyClass(imp.java:236)
        at org.python.core.imp.createFromPyClass(imp.java:205)
        at org.python.core.imp.loadFromSource(imp.java:649)
        at org.python.core.imp.find_module(imp.java:542)
        at org.python.core.imp.import_next(imp.java:837)
        at org.python.core.imp.import_module_level(imp.java:956)
        at org.python.core.imp.importName(imp.java:1057)
        at org.python.core.ImportFunction.__call__(__builtin__.java:1280)
        at org.python.core.PyObject.__call__(PyObject.java:431)
        at org.python.core.__builtin__.__import__(__builtin__.java:1232)
        at org.python.core.imp.importOne(imp.java:1076)
        at urllib$py.f$0(/usr/share/jython-2.7/Lib/urllib.py:1599)
        at urllib$py.call_function(/usr/share/jython-2.7/Lib/urllib.py)
        at org.python.core.PyTableCode.call(PyTableCode.java:167)
        at org.python.core.PyCode.call(PyCode.java:18)
        at org.python.core.imp.createFromCode(imp.java:435)
        at org.python.core.imp.createFromPyClass(imp.java:236)
        at org.python.core.imp.createFromPyClass(imp.java:205)
        at org.python.core.imp.loadFromSource(imp.java:649)
        at org.python.core.imp.find_module(imp.java:542)
        at org.python.core.imp.import_next(imp.java:837)
        at org.python.core.imp.import_module_level(imp.java:956)
        at org.python.core.imp.importName(imp.java:1057)
        at org.python.core.ImportFunction.__call__(__builtin__.java:1280)
        at org.python.core.PyObject.__call__(PyObject.java:431)
        at org.python.core.__builtin__.__import__(__builtin__.java:1232)
        at org.python.core.imp.importOne(imp.java:1076)
        at org.python.pycode._pyx1.f$0(test.py:6)
        at org.python.pycode._pyx1.call_function(test.py)
        at org.python.core.PyTableCode.call(PyTableCode.java:167)
        at org.python.core.PyCode.call(PyCode.java:18)
        at org.python.core.Py.runCode(Py.java:1374)
        at org.python.util.PythonInterpreter.execfile(PythonInterpreter.java:299)
        at org.python.util.jython.run(jython.java:367)
        at org.python.util.jython.main(jython.java:142)

java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: Cannot create PyString with non-byte value


(It might be related to bug #2288.)
History
Date User Action Args
2015-03-19 11:39:35Arfreversetrecipients: + Arfrever, zyasoft
2015-03-19 11:39:35Arfreversetmessageid: <1426765175.12.0.181845002528.issue2293@psf.upfronthosting.co.za>
2015-03-19 11:39:34Arfreverlinkissue2293 messages
2015-03-19 11:39:33Arfrevercreate