python-duckling icon indicating copy to clipboard operation
python-duckling copied to clipboard

problem when parsing

Open Asma-droid opened this issue 3 years ago • 2 comments

Hi,

When i launch print(d.parse_time(u'Let's meet at 11:45am')), i obtain the error '<' not supported between instances of 'slice' and 'int'

Asma-droid avatar Aug 28 '20 09:08 Asma-droid

I had the same problem. Apparently, it is due to an incompatibility between python-duckling and the latest release of JPype1. The setup.py file in python-duckling is not constraining the version of JPype1 and, consequently, the latest available version is installed.

What I did to solve it was to install the latest version of JPype1 at the time my version of python-duckling was released. That is, for python-duckling==1.8.0 (released on Apr 5, 2018), I installed JPype1==0.6.3 (released on Apr 3, 2018).

P.S.: If facing compilation issues when doing pip install JPype1==0.6.3, try installing the first version released as a wheel package, that is: pip install --force-reinstall JPype1==0.7.0

masdeseiscaracteres avatar Sep 24 '20 09:09 masdeseiscaracteres

I had a similar issue and @masdeseiscaracteres solution worked. However, I had to use pip install --force-reinstall JPype1==0.6.3 (not pip install --force-reinstall JPype1==0.7.0)

My error message was: TypeError: int() argument must be a string, a bytes-like object or a number, not 'java.lang.String'

nbeuchat avatar Jan 21 '21 14:01 nbeuchat