Closed caesar closed 7 years ago
Do you get the error message immediately after enabling?
Yes, immediately after enabling. Also when opening Atom, if the plugin is enabled.
FWIW, calling hunspell
from the command line works, so there is no problem with my hunspell install.
Can you try hunspell -D
on the command line?
$ hunspell -D
SEARCH PATH:
.::/usr/share/hunspell:/usr/share/myspell:/usr/share/myspell/dicts:/Library/Spelling:/Users/caesar/.openoffice.org/3/user/wordbook:.openoffice.org2/user/wordbook:.openoffice.org2.0/user/wordbook:Library/Spelling:/opt/openoffice.org/basis3.0/share/dict/ooo:/usr/lib/openoffice.org/basis3.0/share/dict/ooo:/opt/openoffice.org2.4/share/dict/ooo:/usr/lib/openoffice.org2.4/share/dict/ooo:/opt/openoffice.org2.3/share/dict/ooo:/usr/lib/openoffice.org2.3/share/dict/ooo:/opt/openoffice.org2.2/share/dict/ooo:/usr/lib/openoffice.org2.2/share/dict/ooo:/opt/openoffice.org2.1/share/dict/ooo:/usr/lib/openoffice.org2.1/share/dict/ooo:/opt/openoffice.org2.0/share/dict/ooo:/usr/lib/openoffice.org2.0/share/dict/ooo
AVAILABLE DICTIONARIES (path is not mandatory for -d option):
Library/Spelling/en_GB
LOADED DICTIONARY:
Library/Spelling/en_GB.aff
Library/Spelling/en_GB.dic
Hunspell 1.5.4
Does not exit unless I press Ctrl+C. (I don't know if that's intended behaviour?)
Note that the en_GB dictionary files are in ~/Library/Spelling
, although hunspell omits the ~/
.
Also, They were previously called en-GB
(with a hyphen instead of an underscore), which works fine for the OS X spell checker, but hunspell complained: Can't open affix or dictionary files for dictionary named "en_GB".
so I had to rename them…
hunspell won't exit until it sees an end of file marker. Try using ctrl-d then do a echo $?
. Assuming you are using a bash-like shell.
I'm using fish, so it's $status
instead of $?
– but anyway: the exit status is 0.
I have reproduced it. No idea why but it looks like hunspell isn't finding any dictionaries when called from inside Atom.
Interesting… how did you reproduce this? Presumably it does not apply for everybody, so what did you do to make it happen? How might my config (which seems fairly vanilla) differ from setups where it works?
Nothing in particular. The last time the CI build ran on MacOS it used hunspell v1.4.1. Since then hunspell has upgraded to v1.5.4 and CI is failing so it is probably something there.
I'll look around and see if I can find the problem.
@caesar Just pushed out a patch (v0.12.6). Give it a try.
It works! 🎉
Thanks for sorting this out so fast @yitzchak!
Awesome. Thanks for taking the time to report the issue.
Hello, This week, exactly the same error message described in this issue appeared on my machine I'm using version 0.12.6 and hunspell v 1.6.0 on macOS. For me it looks like a hunspell update broke the plugin for me.
Happens to me as well, using elementary OS Loki.
Thanks for the issue notification! I'll try to reproduce it.
Also have the issue on macOS Hunspell 1.6.1 linter-spell 0.13
Hunspell from cli works.
Same here :-/
macOS Hunspell 1.6.1 linter-spell 0.13.2
Have this issue as well, but my error says failed with a status code of null macOS Hunspell 1.6.1 linter-spell 0.13.2
Specifying full path worked.
Same issue with hunspell 1.6.2, atom 1.23 and linter-spell 0.15 (exit code 1).
@chapmanc I also got the same error that "call to hunspell failed with a code of null". Is hunspell automatically installed with the package? By the way, could you pls share the path since I am not sure how to find it. Btw, I'm using wins 10.
Is hunspell automatically installed with the package
No. Most, if not all, external programs are not installed by any packages.
@Aerijo Is there any way to install it? I did some research but all institutions are about mac. I actually did a search and somehow find some hunspell files under Anaconda3 folder. Should I copy one of those files path into linter-spell settings in Atom?
@stevencollinscn Hunspell is a program in and of itself. Short of a prebuilt version, the github repo seems to have instructions on how to build it for Windows.
@Aerijo I tried to follow the instruction for windows but got the following errors while trying to run those commends on their github page. I also saw other users have this issue as well.
I got it working with Hunspell from Cygwin distribution.
Install Hunspell and dictionaries from Cygwin, then create a file hunspell.bat
:
@echo off
C:\cygwin64\bin\bash -c "/bin/hunspell %*"
Go to Atom, open linter-spell
plugin settings, put hunspell.bat
into Spell Path field. Now Ctrl-Shift-Y works, spell checking works.
When I enable the plugin, it shows the error:
Call to hunspell failed with a code of 1.
I have installed hunspell using
brew
and I have tried setting the path manually in linter-spell's preferences (/usr/local/bin/hunspell
). The message remains the same.There are no errors logged in the Javascript console, though linter-spell is logging the message:
All dependencies installed, good to go
.