Trying to set up Geany on my home computer and the Spellcheck plugin is refusing to work.
It comes up with "The Enchant library couldn't be initialized (unknown error(maybe the chosen language is not available))."
When I go into the plugin's preferences the "Language to us" field is empty and I can't change it.
I have tried setting the "Directory to look for" path to blank, C:\dictionaries\hunspell, C:\Program Files\LibreOffice\share\extensions\dict-en, C:\Program Files (x86)\Geany\hunspell and C:\Program Files (x86)\Geany\hunspell\dict-en and nothing works.
The Spellcheck menu option remains greyed out and the Enchant library error appears when toggling the plugin or applying the settings.
I have installed enchant_1.5.0-2_win32.zip over the Geany package as suggested on the portable version's site and the only change is that the menu entry is no longer greyed out and there is a "Default (en)" option listed there.
The plugin still doesn't work and interacting with the plugin via the Plugin Manager or plugin Preferences brings up the same error. ![Untitled](https://user-images.githubusercontent.com/15187821/71702760-0d089780-2e36-11...)
Trying to set up Geany on my home computer and the Spellcheck plugin is refusing to work.
I have installed enchant_1.5.0-2_win32.zip over the Geany package as suggested on the portable version's site and the only change is that the menu entry is no longer greyed out and there is a "Default (en)" option listed there.
We cannot support instructions from other people without knowing why they suggest this. Please either use the library versions bundled with the Geany installer or ask for support at the authors of portable version. Enchant 1.5 most probably won't work on the Windows version of the plugin. At the very least it is not supported and much newer versions are bundled with the Geany installer.
The plugin still doesn't work and interacting with the plugin via the Plugin Manager or plugin Preferences brings up the same error.
_Also, if you click away from this error, you can't alt-tab back to the message box, effectively killing Geany since you can't close the window or interact with it in any way. Though that may be a GTK/Windows issue._
Hard to say what is causing this but it might all be related to the old Enchant version you have installed.
Did you read the instructions on https://plugins.geany.org/spellcheck.html#configuring-custom-dictionaries?
The steps where listed basically chronologically.
I first attempted to follow the instructions posted at https://plugins.geany.org/spellcheck.html#configuring-custom-dictionaries resulting in the "Directory to look for..." being set, as described, to `C:\dictionaries\hunspell`
The Enchant version in use currently is: `22:40:50: SpellCheck DEBUG : Initializing Enchant library version 2.2.5`
Without the enchant_1.5.0-2_win32.zip it shows up as... `23:05:00: SpellCheck DEBUG : Initializing Enchant library version 2.2.5`
The same error persists with a fresh install all around.
The full load log: `23:04:59: Geany INFO : Geany 1.36, English_New Zealand.1252 23:04:59: Geany INFO : GTK 2.24.32, GLib 2.60.6 23:04:59: Geany INFO : System data dir: C:\Program Files (x86)\Geany\data 23:04:59: Geany INFO : User config dir: C:\Users\hawar\AppData\Roaming\geany 23:05:00: Geany INFO : System plugin path: C:\Program Files (x86)\Geany\lib\geany 23:05:00: Geany INFO : Added filetype Arduino (61). 23:05:00: Geany INFO : Added filetype Clojure (62). 23:05:00: Geany INFO : Added filetype CUDA (63). 23:05:00: Geany INFO : Added filetype Cython (64). 23:05:00: Geany INFO : Added filetype Genie (65). 23:05:00: Geany INFO : Added filetype Graphviz (66). 23:05:00: Geany INFO : Added filetype Groovy (67). 23:05:00: Geany INFO : Added filetype JSON (68). 23:05:00: Geany INFO : Added filetype Kotlin (69). 23:05:00: Geany INFO : Added filetype Nim (70). 23:05:00: Geany INFO : Added filetype Scala (71). 23:05:00: Geany INFO : Added filetype Swift (72). 23:05:00: Geany INFO : Added filetype TypeScript (73). 23:05:00: GLib-GIO DEBUG : _g_io_module_get_default: Found default implementation winhttp (GWinHttpVfs) for ‘gio-vfs’ 23:05:00: SpellCheck DEBUG : Initializing Enchant library version 2.2.5 23:05:00: (NULL) WARNING : Error loading plugin: 'C:\Program Files (x86)\Geany/lib/enchant-2\enchant_aspell.dll': The specified module could not be found.
23:05:00: (NULL) WARNING : Error loading plugin: 'C:\Program Files (x86)\Geany/lib/enchant-2\enchant_voikko.dll': The specified module could not be found.
23:05:00: SpellCheck WARNING : Stored language ('en') could not be loaded. 23:05:00: Geany INFO : Loaded: C:\Program Files (x86)\Geany\lib\geany\spellcheck.dll (Spell Check) 23:05:00: Geany INFO : unknown : None (UTF-8) 23:05:17: Gdk WARNING : ../../../gtk+-2.24.32/gdk/win32/gdkselection-win32.c:1192: OpenClipboard failed: Access is denied. ` C:\Program Files (x86)\Geany\lib\enchant-2 contains both enchant_aspell.dll and enchant_voikko.dll and aspell is already install in a previous attempt to get the spell check working.
The aspell and voikko providers are not relevant (as far as I know they don't work with custom dictionary directories at all on Windows).
In the plugin settings, you need to configure the path as `C:\dictionaries` if the dictionary files are located in ` C:\dictionaries\hunspell`.
``` ... 23:05:00: SpellCheck DEBUG : Initializing Enchant library version 2.2.5 23:05:00: (NULL) WARNING : Error loading plugin: 'C:\Program Files (x86)\Geany/lib/enchant-2\enchant_aspell.dll': The specified module could not be found. ... ```
This appears as some odd path issue: `"\Geany/lib/enchant-2\enchant_aspell.dll"`. The slashes mixed with backslashes.
Indeed the .dll **is** present, yet the loader apparently can't load it via such a mixed path. Not sure whether it's a build or a configuration issue.
Same warning is being reported from GeanyVC plugin (at commit dialog, which uses GTKspell for commit message check). See the issue #1056
Closed #939.
Indeed the .dll **is** present, yet the loader apparently can't load it via such a mixed path. Not sure whether it's a build or a configuration issue.
The aspell und voikko error messages are unrelated to the problem here and they appear always even if the SpellCheck plugin correctly. This is rather a MSYS2 build issue or because we don't install the aspell and voikko libraries. Anyway, both are not required on Windows and they don't support custom dictionary directories.
@shawarden if the problem still exists for you and you got more information, just re-open.
github-comments@lists.geany.org