[sword-devel] Python and strong module
pierre amadio
amadio.pierre at gmail.com
Sat Apr 20 08:18:17 MST 2019
Excellent, that did the trick.
Thanks !
On Sat, 20 Apr 2019 at 16:59, Troy A. Griffitts <scribe at crosswire.org> wrote:
>
> Dear Pierre,
>
> In Python, it looks like you are setting your strongs number into a VerseKey. This will give a out of bounds error and will likely return the last entry if you continue to do a look up with it. You probably just want an SWKey instead of VerseKey. This is the most base type of key in SWORD and simply takes a string and doesn't try to parse it or do anything special with it.
>
> Hope this helps,
>
> Troy
>
> On April 20, 2019 1:32:28 AM MST, pierre amadio <amadio.pierre at gmail.com> wrote:
>>
>> Hello.
>>
>> I fail to look for a Strong's dictionnary Hebrew entry with python
>> (Red Hat based, sword-python-1.8.1-3.el7.x86_64).
>>
>> Here is the shortest test case i have:
>> https://github.com/pierre-amadio/SwordSandBox/blob/master/python/strongtestcase.py
>>
>> Instead of giving me the entry for 5975 (amad) , it gives the entry
>> for 8674 (Tattnay)
>>
>> I have a similar testcase that works as expected in C++ :
>> https://github.com/pierre-amadio/SwordSandBox/blob/master/strongTest/testStrong/main.cpp
>>
>> I experience a similar outpout if i set a non existing key (say
>> "1111111111111111" instead of "05975" in c++ .
>>
>> Am i doing something wrong (if yes, any idea what ?) in python, or is
>> this a bug in the python binding ?
>> ________________________________
>> sword-devel mailing list: sword-devel at crosswire.org
>> http://www.crosswire.org/mailman/listinfo/sword-devel
>> Instructions to unsubscribe/change your settings at above page
>
>
> --
> Sent from my Android device with K-9 Mail. Please excuse my brevity.
More information about the sword-devel
mailing list