python-duckling
python-duckling copied to clipboard
problem when parsing
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'
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
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'