mekras/php-speller

Failed to execute "hunspell -i UTF-8 -a": Can't open affix or dictionary files for dictionary named "default".

Closed this issue · 5 comments

Hello!

Sorry to bother you but since v1.6 I get this error.
I'm running on CentOs with International Ispell Version 3.2.06 (but really Hunspell 1.3.2)
After dowgrading to v1.5.1 it works just fine.

Here is my code for execution:
$this->speller = new Hunspell(); $this->speller->setDictionaryPath('.../hunspell/custom'); $this->speller->setCustomDictionaries('fr']);

Maybe it's a problem with Hunspell v1.3.2 but unfortunately I'm not able to upgrade it.

thx in advance

Are you specify any language in the second argument of checkText method?

That's what my checkText call looks like.

$this->speller->checkText(new StringSource($word), [])

Fixed in version 1.7.

Hi mekras!

It's me again ;-)

The "default" problem is happening again. I tried to debug this message but I got stuck after a while.
I know that the Exception is thrown in ExternalSpeller.php (line 104) because of the exitCode (=0).
The process itself looks fine (checked commandline and output).
Hunspell/Ispell version doesn't matter cause i have multiple websites on the server (versioning) and the older thing works fine. But fyi @(#) International Ispell Version 3.2.06 (but really Hunspell 1.3.2)
and mekras/php-speller 1.7.2
One difference is symfony version 3.3 vs 3.4 but i did change it back to 3.3 and still same error.
I also went back to 1.5 (php-speller) and still the same.

An exception has been thrown during the rendering of a template ("Failed to execute "hunspell -i UTF-8 -a": Can't open affix or dictionary files for dictionary named "default".
").

Hopefully you can look into that problem and let me know if i can help you somehow.

thx Stefan

I'm getting the same error with php-speller 1.7.2 and hunspell 1.7.0 (on Windows).