You are not logged in.

#1 2018-01-19 18:27:51

amaro
Member
From: 5.11.1-1-ck-ivybridge, xfce
Registered: 2014-05-09
Posts: 364

[SOLVED] scribes crashes- gtkspellcheck.spellcheck.NoDictionariesFound

Hi, everybody!

I checked spellcheck option in 'scribes' and got it crashing with

No handlers could be found for logger "gtkspellcheck.spellcheck"
Traceback (most recent call last):
  File "/usr/bin/scribes", line 11, in <module>
    main()
  File "/usr/lib/python2.7/site-packages/SCRIBES/Main.py", line 8, in main
    __open()
  File "/usr/lib/python2.7/site-packages/SCRIBES/Main.py", line 24, in __open
    Manager().open_files(uris, "utf-8", stdin)
  File "/usr/lib/python2.7/site-packages/SCRIBES/InstanceManager.py", line 79, in open_files
    self.__new_editor(stdin=stdin)
  File "/usr/lib/python2.7/site-packages/SCRIBES/InstanceManager.py", line 163, in __new_editor
    Editor(self, str(uri), encoding, stdin)
  File "/usr/lib/python2.7/site-packages/SCRIBES/Editor.py", line 9, in __init__
    Initializer(self, manager, uri, encoding, stdin)
  File "/usr/lib/python2.7/site-packages/SCRIBES/ServicesInitializer.py", line 30, in __init__
    Manager(editor, uri)
  File "/usr/lib/python2.7/site-packages/SCRIBES/GUI/Manager.py", line 5, in __init__
    Manager(editor, uri)
  File "/usr/lib/python2.7/site-packages/SCRIBES/GUI/MainGUI/Manager.py", line 7, in __init__
    Manager(editor, uri)
  File "/usr/lib/python2.7/site-packages/SCRIBES/GUI/MainGUI/View/Manager.py", line 21, in __init__
    Checker(editor)
  File "/usr/lib/python2.7/site-packages/SCRIBES/GUI/MainGUI/View/SpellChecker.py", line 10, in __init__
    self.__set()
  File "/usr/lib/python2.7/site-packages/SCRIBES/GUI/MainGUI/View/SpellChecker.py", line 33, in __set
    self.__enable() if get_value(language) else self.__disable()
  File "/usr/lib/python2.7/site-packages/SCRIBES/GUI/MainGUI/View/SpellChecker.py", line 42, in __enable
    self.__checker = Spell(self.__view, getdefaultlocale()[0])
  File "/usr/lib/python2.7/site-packages/gtkspell.py", line 32, in __init__
    self.spellchecker = gtkspellcheck.SpellChecker(textview, language)
  File "/usr/lib/python2.7/site-packages/gtkspellcheck/spellcheck.py", line 211, in __init__
    raise NoDictionariesFound()
gtkspellcheck.spellcheck.NoDictionariesFound

Reinstalling 'python-gtkspellcheck' did not help.

How to proceed?
Thank you in advance!

Last edited by amaro (2018-01-20 23:15:24)

Offline

#2 2018-01-19 19:08:52

loqs
Member
Registered: 2014-03-06
Posts: 17,323

Re: [SOLVED] scribes crashes- gtkspellcheck.spellcheck.NoDictionariesFound

Failing like that really appears to be a bug.  As to the cause do you have any hunspell or aspell dictionaries installed?

Offline

#3 2018-01-19 19:38:22

amaro
Member
From: 5.11.1-1-ck-ivybridge, xfce
Registered: 2014-05-09
Posts: 364

Re: [SOLVED] scribes crashes- gtkspellcheck.spellcheck.NoDictionariesFound

Qs aspell
[sudo] password for vb: 
local/aspell 0.60.6.1-5
    A spell checker designed to eventually replace Ispell

Qs hunspell
local/hunspell 1.6.2-1
    Spell checker and morphological analyzer library and program
local/hunspell-en 2017.01.22-2
    English (US, UK, etc.) hunspell dictionaries
local/hunspell-en_GB 2017.01.22-2
    GB English hunspell dictionaries
local/hunspell-en_US 2017.01.22-2
    US English hunspell dictionaries

Last edited by amaro (2018-01-19 19:38:48)

Offline

#4 2018-01-19 20:06:59

loqs
Member
Registered: 2014-03-06
Posts: 17,323

Re: [SOLVED] scribes crashes- gtkspellcheck.spellcheck.NoDictionariesFound

Please try the following and post the output from the last command

python2
>>> import enchant
>>> broker = enchant.Broker()
>>> broker.list_languages()

Offline

#5 2018-01-19 20:10:44

amaro
Member
From: 5.11.1-1-ck-ivybridge, xfce
Registered: 2014-05-09
Posts: 364

Re: [SOLVED] scribes crashes- gtkspellcheck.spellcheck.NoDictionariesFound

python2
Python 2.7.14 (default, Sep 20 2017, 01:25:59) 
[GCC 7.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import enchant
>>> broker = enchant.Broker()
>>> broker.list_languages()
[]
>>> 

Offline

#6 2018-01-19 20:16:35

loqs
Member
Registered: 2014-03-06
Posts: 17,323

Re: [SOLVED] scribes crashes- gtkspellcheck.spellcheck.NoDictionariesFound

So enchant can not find any of hunspell's dictionaries.  Problem with enchant or hunspell or something in between.  What is the output of `hunspell -D`

Offline

#7 2018-01-19 20:26:50

amaro
Member
From: 5.11.1-1-ck-ivybridge, xfce
Registered: 2014-05-09
Posts: 364

Re: [SOLVED] scribes crashes- gtkspellcheck.spellcheck.NoDictionariesFound

hunspell -D
SEARCH PATH:
.::/usr/share/hunspell:/usr/share/myspell:/usr/share/myspell/dicts:/Library/Spelling:/home/vb/.openoffice.org/3/user/wordbook:/home/vb/.openoffice.org2/user/wordbook:/home/vb/.openoffice.org2.0/user/wordbook:/home/vb/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):
/usr/share/hunspell/en_GB
/usr/share/hunspell/en_NA
/usr/share/hunspell/en_BZ
/usr/share/hunspell/en_SG
/usr/share/hunspell/en_TT
/usr/share/hunspell/en_NG
/usr/share/hunspell/en_IN
/usr/share/hunspell/en_AG
/usr/share/hunspell/en_GH
/usr/share/hunspell/en_IE
/usr/share/hunspell/en_BS
/usr/share/hunspell/en_ZW
/usr/share/hunspell/en_JM
/usr/share/hunspell/en_DK
/usr/share/hunspell/en_PH
/usr/share/hunspell/en_HK
/usr/share/hunspell/en_ZA
/usr/share/hunspell/en_GB-large
/usr/share/hunspell/en_NZ
/usr/share/hunspell/en_US
/usr/share/hunspell/en_BW
/usr/share/myspell/dicts/en_GB
/usr/share/myspell/dicts/en_NA
/usr/share/myspell/dicts/en_BZ
/usr/share/myspell/dicts/en_SG
/usr/share/myspell/dicts/en_TT
/usr/share/myspell/dicts/en_NG
/usr/share/myspell/dicts/en_IN
/usr/share/myspell/dicts/en_AG
/usr/share/myspell/dicts/en_GH
/usr/share/myspell/dicts/en_IE
/usr/share/myspell/dicts/en_BS
/usr/share/myspell/dicts/en_ZW
/usr/share/myspell/dicts/en_JM
/usr/share/myspell/dicts/en_DK
/usr/share/myspell/dicts/en_PH
/usr/share/myspell/dicts/en_HK
/usr/share/myspell/dicts/en_ZA
/usr/share/myspell/dicts/en_GB-large
/usr/share/myspell/dicts/en_NZ
/usr/share/myspell/dicts/en_US
/usr/share/myspell/dicts/en_BW
LOADED DICTIONARY:
/usr/share/hunspell/en_US.aff
/usr/share/hunspell/en_US.dic
Hunspell 1.6.2

Offline

#8 2018-01-19 20:43:36

loqs
Member
Registered: 2014-03-06
Posts: 17,323

Re: [SOLVED] scribes crashes- gtkspellcheck.spellcheck.NoDictionariesFound

As hunspell appears fine is enchant the cause?

$ enchant-lsmod -list-dicts

Offline

#9 2018-01-19 20:49:37

amaro
Member
From: 5.11.1-1-ck-ivybridge, xfce
Registered: 2014-05-09
Posts: 364

Re: [SOLVED] scribes crashes- gtkspellcheck.spellcheck.NoDictionariesFound

 enchant-lsmod -list-dicts
en_ZA (hunspell)
en_NZ (hunspell)
en_HK (hunspell)
en_BW (hunspell)
en_TT (hunspell)
en_NA (hunspell)
en_BZ (hunspell)
en_IN (hunspell)
en_JM (hunspell)
he (hspell)
en_NG (hunspell)
en_US (hunspell)
en_AG (hunspell)
en_PH (hunspell)
en_ZW (hunspell)
en_SG (hunspell)
en_GB (hunspell)
en_DK (hunspell)
en_GH (hunspell)
en_IE (hunspell)
en_BS (hunspell)

Offline

#10 2018-01-19 20:53:42

loqs
Member
Registered: 2014-03-06
Posts: 17,323

Re: [SOLVED] scribes crashes- gtkspellcheck.spellcheck.NoDictionariesFound

So the issue is with python2-pyenchant.

pacman -Qi python2-pyenchant
pacman -Qkk python2-pyenchant

Offline

#11 2018-01-19 20:58:31

amaro
Member
From: 5.11.1-1-ck-ivybridge, xfce
Registered: 2014-05-09
Posts: 364

Re: [SOLVED] scribes crashes- gtkspellcheck.spellcheck.NoDictionariesFound

Qi python2-pyenchant
[sudo] password for vb: 
Name            : python2-pyenchant
Version         : 2.0.0-1
Description     : PyEnchant is a spellchecking library for Python2 based on the Enchant library
Architecture    : any
URL             : https://pypi.python.org/pypi/pyenchant
Licenses        : LGPL
Groups          : None
Provides        : None
Depends On      : python2  enchant
Optional Deps   : None
Required By     : python2-gtkspellcheck
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 575.00 KiB
Packager        : Jelle van der Waa <jelle@vdwaa.nl>
Build Date      : Mon 11 Dec 2017 04:47:45 PM EET
Install Date    : Sat 13 Jan 2018 10:57:24 PM EET
Install Reason  : Installed as a dependency for another package
Install Script  : No
Validated By    : SHA-256 Sum

22:57:10 ~ $ sudo pacman -Qkk python2-pyenchant
python2-pyenchant: 55 total files, 0 altered files

Offline

#12 2018-01-19 21:37:04

loqs
Member
Registered: 2014-03-06
Posts: 17,323

Re: [SOLVED] scribes crashes- gtkspellcheck.spellcheck.NoDictionariesFound

Can you try modifying usr/lib/python2.7/site-packages/enchant/_enchant.py line 215 add a line so the function becomes

def broker_list_dicts(broker,cbfunc):
    def cbfunc1(*args):
        print args
        cbfunc(*args[:-1])
    broker_list_dicts1(broker,t_dict_desc_func(cbfunc1),None)

Then try the commands from post #4 again please.
After this testing you can restore the original by reinstalling python2-pyenchant
Edit:
Also the output of

$ pacman -Qi enchant
$ pacman -Qkk enchant

Last edited by loqs (2018-01-19 21:44:32)

Offline

#13 2018-01-20 05:54:00

amaro
Member
From: 5.11.1-1-ck-ivybridge, xfce
Registered: 2014-05-09
Posts: 364

Re: [SOLVED] scribes crashes- gtkspellcheck.spellcheck.NoDictionariesFound

$ sn /usr/lib/python2.7/site-packages/enchant/_enchant.py
[sudo] password for vb: 

$ python2
Python 2.7.14 (default, Sep 20 2017, 01:25:59) 
[GCC 7.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import enchant
>>> broker = enchant.Broker()
>>> broker.list_languages()
[]
>>> 

Offline

#14 2018-01-20 06:06:02

amaro
Member
From: 5.11.1-1-ck-ivybridge, xfce
Registered: 2014-05-09
Posts: 364

Re: [SOLVED] scribes crashes- gtkspellcheck.spellcheck.NoDictionariesFound

$ cat /usr/lib/python2.7/site-packages/enchant/_enchant.py


# pyenchant
#
# Copyright (C) 2004-2008, Ryan Kelly
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
# In addition, as a special exception, you are
# given permission to link the code of this program with
# non-LGPL Spelling Provider libraries (eg: a MSFT Office
# spell checker backend) and distribute linked combinations including
# the two.  You must obey the GNU Lesser General Public License in all
# respects for all of the code used other than said providers.  If you modify
# this file, you may extend this exception to your version of the
# file, but you are not obligated to do so.  If you do not wish to
# do so, delete this exception statement from your version.
#
"""

    enchant._enchant:  ctypes-based wrapper for enchant C library

    This module implements the low-level interface to the underlying
    C library for enchant.  The interface is based on ctypes and tries 
    to do as little as possible while making the higher-level components
    easier to write.

    The following conveniences are provided that differ from the underlying
    C API:

        * the "enchant" prefix has been removed from all functions, since
          python has a proper module system
        * callback functions do not take a user_data argument, since
          python has proper closures that can manage this internally
        * string lengths are not passed into functions such as dict_check,
          since python strings know how long they are

"""

import sys, os, os.path
from ctypes import *
from ctypes.util import find_library

from enchant import utils
from enchant.errors import *
from enchant.utils import unicode

# Locate and load the enchant dll.
# We've got several options based on the host platform.

e = None

def _e_path_possibilities():
    """Generator yielding possible locations of the enchant library."""
    # Allow it to be overridden using an environment variable.
    yield os.environ.get("PYENCHANT_LIBRARY_PATH")
    # For linuxish systems, allow default soname lookup a chance to succeed.
    if sys.platform not in ("win32", "darwin"):
        yield "libenchant.so.1.6.0"
        yield "libenchant.so.1"
        yield "libenchant.so"
    # See if ctypes can find the library for us, under various names.
    yield find_library("enchant")
    yield find_library("libenchant")
    yield find_library("libenchant-1")
    # Special-case handling for enchant installed by macports.
    if sys.platform == 'darwin':
         yield "/opt/local/lib/libenchant.dylib"


# On win32 we ship a bundled version of the enchant DLLs.
# Use them if they're present.
if sys.platform == "win32":
    e_path = None
    try:
        e_path = utils.get_resource_filename("libenchant.dll")
    except (Error,ImportError):
         try:
            e_path = utils.get_resource_filename("libenchant-1.dll")
         except (Error,ImportError):
            pass
    if e_path is not None:
        # We need to use LoadLibraryEx with LOAD_WITH_ALTERED_SEARCH_PATH so
        # that we don't accidentally suck in other versions of e.g. glib.
        if not isinstance(e_path,unicode):
            e_path = unicode(e_path,sys.getfilesystemencoding())
        LoadLibraryEx = windll.kernel32.LoadLibraryExW
        LOAD_WITH_ALTERED_SEARCH_PATH = 0x00000008
        e_handle = LoadLibraryEx(e_path,None,LOAD_WITH_ALTERED_SEARCH_PATH)
        if not e_handle:
            raise WinError()
        e = CDLL(e_path,handle=e_handle)


# On darwin we ship a bundled version of the enchant DLLs.
# Use them if they're present.
if e is None and sys.platform == "darwin":
  try:
      e_path = utils.get_resource_filename("lib/libenchant.1.dylib")
  except (Error,ImportError):
      pass
  else:
      # Enchant doesn't natively support relocatable binaries on OSX.
      # We fake it by patching the enchant source to expose a char**, which
      # we can write the runtime path into ourselves.
      e = CDLL(e_path)
      try:
          e_dir = os.path.dirname(os.path.dirname(e_path))
          if isinstance(e_dir,unicode):
              e_dir = e_dir.encode(sys.getfilesystemencoding())
          prefix_dir = POINTER(c_char_p).in_dll(e,"enchant_prefix_dir_p")
          prefix_dir.contents = c_char_p(e_dir)
      except AttributeError:
          e = None


# Not found yet, search various standard system locations.
if e is None:
    for e_path in _e_path_possibilities():
        if e_path is not None:
            try:
                e = cdll.LoadLibrary(e_path)
            except OSError:
                pass
            else:
                break


# No usable enchant install was found :-(
if e is None:
   msg = "The 'enchant' C library was not found. "\
         "Please install it via your OS package manager, "\
         "or use a pre-built binary wheel from PyPI."
   raise ImportError(msg)


# Define various callback function types

def CALLBACK(restype,*argtypes):
    """Factory for generating callback function prototypes.

    This is factored into a factory so I can easily change the definition
    for experimentation or debugging.
    """
    return CFUNCTYPE(restype,*argtypes)

t_broker_desc_func = CALLBACK(None,c_char_p,c_char_p,c_char_p,c_void_p)
t_dict_desc_func = CALLBACK(None,c_char_p,c_char_p,c_char_p,c_char_p,c_void_p)


# Simple typedefs for readability

t_broker = c_void_p
t_dict = c_void_p


# Now we can define the types of each function we are going to use

broker_init = e.enchant_broker_init
broker_init.argtypes = []
broker_init.restype = t_broker

broker_free = e.enchant_broker_free
broker_free.argtypes = [t_broker]
broker_free.restype = None

broker_request_dict = e.enchant_broker_request_dict
broker_request_dict.argtypes = [t_broker,c_char_p]
broker_request_dict.restype = t_dict

broker_request_pwl_dict = e.enchant_broker_request_pwl_dict
broker_request_pwl_dict.argtypes = [t_broker,c_char_p]
broker_request_pwl_dict.restype = t_dict

broker_free_dict = e.enchant_broker_free_dict
broker_free_dict.argtypes = [t_broker,t_dict]
broker_free_dict.restype = None

broker_dict_exists = e.enchant_broker_dict_exists
broker_dict_exists.argtypes = [t_broker,c_char_p]
broker_free_dict.restype = c_int

broker_set_ordering = e.enchant_broker_set_ordering
broker_set_ordering.argtypes = [t_broker,c_char_p,c_char_p]
broker_set_ordering.restype = None

broker_get_error = e.enchant_broker_get_error
broker_get_error.argtypes = [t_broker]
broker_get_error.restype = c_char_p

broker_describe1 = e.enchant_broker_describe
broker_describe1.argtypes = [t_broker,t_broker_desc_func,c_void_p]
broker_describe1.restype = None
def broker_describe(broker,cbfunc):
    def cbfunc1(*args):
        cbfunc(*args[:-1])
    broker_describe1(broker,t_broker_desc_func(cbfunc1),None)

broker_list_dicts1 = e.enchant_broker_list_dicts
broker_list_dicts1.argtypes = [t_broker,t_dict_desc_func,c_void_p]
broker_list_dicts1.restype = None
def broker_list_dicts(broker,cbfunc):
    def cbfunc1(*args):
        print args
        cbfunc(*args[:-1])
    broker_list_dicts1(broker,t_dict_desc_func(cbfunc1),None)

try:
    broker_get_param = e.enchant_broker_get_param
except AttributeError:
    #  Make the lookup error occur at runtime
    def broker_get_param(broker,param_name):
        return e.enchant_broker_get_param(param_name)
else:
    broker_get_param.argtypes = [t_broker,c_char_p]
    broker_get_param.restype = c_char_p

try:
    broker_set_param = e.enchant_broker_set_param
except AttributeError:
    #  Make the lookup error occur at runtime
    def broker_set_param(broker,param_name):
        return e.enchant_broker_set_param(param_name)
else:
    broker_set_param.argtypes = [t_broker,c_char_p,c_char_p]
    broker_set_param.restype = None

try:
    get_version = e.enchant_get_version
except AttributeError:
    #  Make the lookup error occur at runtime
    def get_version():
        return e.enchant_get_version()
else:
    get_version.argtypes = []
    get_version.restype = c_char_p


dict_check1 = e.enchant_dict_check
dict_check1.argtypes = [t_dict,c_char_p,c_size_t]
dict_check1.restype = c_int
def dict_check(dict,word):
    return dict_check1(dict,word,len(word))

dict_suggest1 = e.enchant_dict_suggest
dict_suggest1.argtypes = [t_dict,c_char_p,c_size_t,POINTER(c_size_t)]
dict_suggest1.restype = POINTER(c_char_p)
def dict_suggest(dict,word):
    numSuggsP = pointer(c_size_t(0))
    suggs_c = dict_suggest1(dict,word,len(word),numSuggsP)
    suggs = []
    n = 0
    while n < numSuggsP.contents.value:
        suggs.append(suggs_c[n])
        n = n + 1
    if numSuggsP.contents.value > 0:
        dict_free_string_list(dict,suggs_c)
    return suggs

dict_add1 = e.enchant_dict_add
dict_add1.argtypes = [t_dict,c_char_p,c_size_t]
dict_add1.restype = None
def dict_add(dict,word):
    return dict_add1(dict,word,len(word))

dict_add_to_pwl1 = e.enchant_dict_add
dict_add_to_pwl1.argtypes = [t_dict,c_char_p,c_size_t]
dict_add_to_pwl1.restype = None
def dict_add_to_pwl(dict,word):
    return dict_add_to_pwl1(dict,word,len(word))

dict_add_to_session1 = e.enchant_dict_add_to_session
dict_add_to_session1.argtypes = [t_dict,c_char_p,c_size_t]
dict_add_to_session1.restype = None
def dict_add_to_session(dict,word):
    return dict_add_to_session1(dict,word,len(word))

dict_remove1 = e.enchant_dict_remove
dict_remove1.argtypes = [t_dict,c_char_p,c_size_t]
dict_remove1.restype = None
def dict_remove(dict,word):
    return dict_remove1(dict,word,len(word))

dict_remove_from_session1 = e.enchant_dict_remove_from_session
dict_remove_from_session1.argtypes = [t_dict,c_char_p,c_size_t]
dict_remove_from_session1.restype = c_int
def dict_remove_from_session(dict,word):
    return dict_remove_from_session1(dict,word,len(word))

dict_is_added1 = e.enchant_dict_is_added
dict_is_added1.argtypes = [t_dict,c_char_p,c_size_t]
dict_is_added1.restype = c_int
def dict_is_added(dict,word):
    return dict_is_added1(dict,word,len(word))

dict_is_removed1 = e.enchant_dict_is_removed
dict_is_removed1.argtypes = [t_dict,c_char_p,c_size_t]
dict_is_removed1.restype = c_int
def dict_is_removed(dict,word):
    return dict_is_removed1(dict,word,len(word))

dict_store_replacement1 = e.enchant_dict_store_replacement
dict_store_replacement1.argtypes = [t_dict,c_char_p,c_size_t,c_char_p,c_size_t]
dict_store_replacement1.restype = None
def dict_store_replacement(dict,mis,cor):
    return dict_store_replacement1(dict,mis,len(mis),cor,len(cor))

dict_free_string_list = e.enchant_dict_free_string_list
dict_free_string_list.argtypes = [t_dict,POINTER(c_char_p)]
dict_free_string_list.restype = None

dict_get_error = e.enchant_dict_get_error
dict_get_error.argtypes = [t_dict]
dict_get_error.restype = c_char_p

dict_describe1 = e.enchant_dict_describe
dict_describe1.argtypes = [t_dict,t_dict_desc_func,c_void_p]
dict_describe1.restype = None
def dict_describe(dict,cbfunc):
    def cbfunc1(tag,name,desc,file,data):
        cbfunc(tag,name,desc,file)
    dict_describe1(dict,t_dict_desc_func(cbfunc1),None)

Offline

#15 2018-01-20 12:07:25

loqs
Member
Registered: 2014-03-06
Posts: 17,323

Re: [SOLVED] scribes crashes- gtkspellcheck.spellcheck.NoDictionariesFound

loqs wrote:

Also the output of

$ pacman -Qi enchant
$ pacman -Qkk enchant

The rest of the output shows python2-pyenchant calling enchants enchant_broker_list_dicts method but the callback that should be used once per dictionary is never used.
I can not replicate this on my system the callback is called for each dictionary installed as expected.

Offline

#16 2018-01-20 15:26:30

amaro
Member
From: 5.11.1-1-ck-ivybridge, xfce
Registered: 2014-05-09
Posts: 364

Re: [SOLVED] scribes crashes- gtkspellcheck.spellcheck.NoDictionariesFound

$ pacman -Qi enchant
Name            : enchant
Version         : 2.1.2-3
Description     : A wrapper library for generic spell checking
Architecture    : x86_64
URL             : https://abiword.github.io/enchant/
Licenses        : LGPL
Groups          : None
Provides        : None
Depends On      : aspell  hunspell  hspell  libvoikko  glib2
Optional Deps   : None
Required By     : gspell  gtkspell  python-pyenchant  python2-pyenchant  webkit2gtk  webkitgtk2
Optional For    : artha
Conflicts With  : None
Replaces        : None
Installed Size  : 140.00 KiB
Packager        : Jan de Groot <jgc@archlinux.org>
Build Date      : Sat 16 Dec 2017 12:54:32 AM EET
Install Date    : Sun 17 Dec 2017 08:53:34 PM EET
Install Reason  : Installed as a dependency for another package
Install Script  : No
Validated By    : SHA-256 Sum

$ pacman -Qkk enchant
enchant: 27 total files, 0 altered files

Last edited by amaro (2018-01-20 15:28:27)

Offline

#17 2018-01-20 23:12:07

amaro
Member
From: 5.11.1-1-ck-ivybridge, xfce
Registered: 2014-05-09
Posts: 364

Re: [SOLVED] scribes crashes- gtkspellcheck.spellcheck.NoDictionariesFound

I decided to try to find the spellcheck settings of 'Scribes' in the cache. Found them here '/home/vb/.config/scribes/Preferences/Languages/'. I checked that file -  '/home/vb/.config/scribes/Preferences/Languages/SpellCheck.gdb'. It was empty. So I deleted it. After that 'Scribes' works again.

@loqs
Thank you very much for the time and willingness to help! Really appreciate it!

Offline

#18 2018-01-20 23:23:49

loqs
Member
Registered: 2014-03-06
Posts: 17,323

Re: [SOLVED] scribes crashes- gtkspellcheck.spellcheck.NoDictionariesFound

Seems the root cause is still there but you have a found a work around you are satisfied with.

Offline

#19 2018-01-20 23:29:47

amaro
Member
From: 5.11.1-1-ck-ivybridge, xfce
Registered: 2014-05-09
Posts: 364

Re: [SOLVED] scribes crashes- gtkspellcheck.spellcheck.NoDictionariesFound

You are right - the cause is still there. If you suggest something else I will try it out. No obligations on your part, though. I am grateful for your help!

Offline

#20 2018-01-20 23:52:23

loqs
Member
Registered: 2014-03-06
Posts: 17,323

Re: [SOLVED] scribes crashes- gtkspellcheck.spellcheck.NoDictionariesFound

No out of ideas sorry.  On your system enchant-lsmod -list-dicts loads libenchant.so calls enchant_broker_list_dicts the list of dictionaries is outputed.
Also on your system python2-pyenchant  e is libenchant.so broker_list_dicts1 = e.enchant_broker_list_dicts and is called by broker_list_dicts but produces no output.
Unless I am mistaken and python2-pyenchant is not loading the same library I do not understand how the outputs can be different.

Offline

Board footer

Powered by FluxBB