You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pylucene-dev@lucene.apache.org by "Andi Vajda (JIRA)" <ji...@apache.org> on 2017/05/22 20:33:04 UTC
[jira] [Resolved] (PYLUCENE-36) Python exception when handling a
Java error
[ https://issues.apache.org/jira/browse/PYLUCENE-36?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andi Vajda resolved PYLUCENE-36.
--------------------------------
Resolution: Fixed
merged, thanks !
> Python exception when handling a Java error
> -------------------------------------------
>
> Key: PYLUCENE-36
> URL: https://issues.apache.org/jira/browse/PYLUCENE-36
> Project: PyLucene
> Issue Type: Bug
> Environment: Python 3.5, Ubuntu 16.04, Java 8
> Reporter: Paulo Villegas
> Attachments: pylucene-6.5.0-py3.5.patch
>
>
> When handling a Java exception via the {{JavaError}} class, Python 3.5 generates an exception due to the call to {{unicode}} (which does not exist in Python 3), hence masking the actual Java exception with a Python _NameError_ exception.
> I guess this is a consequence of PYLUCENE-35. That one fixed the problem with Unicode characters in Java exceptions for Python 2, but it shouldn't be applied to Python 3 (since in Python 3 the {{str}} type *is* natively Unicode).
> The attached small patch (applied only to the Python 3 branch) fixes it for me.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)