Enchant spell checker problem

Hello. I want to create snap for application that uses enchant library to spell checker. The application is written in Python and uses pyenchant as enchant wrapper. Enchant can use several engines for spell checking. But from snap Enchant cannot detect any spell checkers.

I make a minimal Python application to test. The application print spell checkers with Enchant.

# -*- coding: utf-8 -*-

from enchant import Broker


if __name__ == '__main__':
    broker = Broker()
    print(broker.describe())

If I run this script as a normal script, will be shown:

[<Enchant: Ispell Provider>, <Enchant: Aspell Provider>, <Enchant: Hspell Provider>, <Enchant: Myspell Provider>]

But from snap (in devmode also) the script displays empty list.:

[]

I uploaded test apllication with snapcraft.yaml file and snap file to storage - https://drive.google.com/drive/folders/1PFweZ9Ks8MXQgtwV7OEovSqU3572PqD4?usp=sharing

After install with --devmode and --dangerous flags will be created testenchant application.

Maybe there will be ideas about what the problem is and how to fix it. I suspect the problem is in Enchant, but not in the Python wrapper.

The Enchant library requires additional patching to function properly in snaps, check out Poedit’s snapcraft recipe for a working implementation.

1 Like

Thank you for the hint. I will try.

1 Like