Skip to content

IndexError: string index out of range #1

Description

@PanderMusubi

This works

from hunspell2 import HunSpell
hun = HunSpell('/usr/share/hunspell/en_US.dic')
hun.suggest('0000-0049')

and results in []

However this

from hunspell2 import HunSpell
hun = HunSpell('/usr/share/hunspell/es_ES.dic')
hun.suggest('0000-0049')

results in this error

File "./.venv/lib/python3.13/site-packages/hunspell2/hunspell.py", line 34, in suggest
    if ans[0] != "&":
       ~~~^^^
IndexError: string index out of range
>>> from hunspell2 import HunSpell

Can you fix this please?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions