Details
Description
When a javaException is raised and the stacktrace includes unicode characters, the stacktrace will not be printed. Instead, line 11 of _init_.py will raise a UnicodeEncodingError:
!!! File "/usr/lib/python2.7/site-packages/lucene-4.9.0-py2.7-linux-x86_64.egg/lucene/_init.py", line 17, in __str_!!!
!!! return "\n".join((super(JavaError, self)._str_(), " Java stacktrace:", str(writer)))!!!
!!Unable to render embedded object: File ( 'ascii' codec can't encode characters in position 102-103: ordinal not in range(128)) not found.!!
I found a workaround: change that line to
return u"\n".join((unicode(super(JavaError, self)), u" Java stacktrace:", unicode(writer)))
,then it could print the correct stacktrace which contains unicode characters in file path.