Problem typing with ibus-cangjie-engine-cangjie-2.4.1-1
Problem
Unable to type after upgrading to ibus-cangjie-engine-cangjie-2.4.1-1.
Investigation
Killed the ibus initiated process of ibus-cangjie and then manually run this to get error messages to STDOUT / STDERR:
/usr/lib/ibus-cangjie/ibus-engine-cangjie --ibus cangjie
Input engine keeps getting error when typing:
Traceback (most recent call last):
File "/usr/lib/python3.12/site-packages/ibus_cangjie/engine.py", line 67, in __init__
self.init_cangjie()
File "/usr/lib/python3.12/site-packages/ibus_cangjie/engine.py", line 125, in init_cangjie
self.cangjie = cangjie.Cangjie(version, filters)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "_core.pyx", line 114, in cangjie._core.Cangjie.__cinit__
File "errors.pyx", line 56, in cangjie.errors.handle_error_code
cangjie.errors.CangjieDBOpenError: Error opening the database
Traceback (most recent call last):
File "/usr/lib/python3.12/site-packages/ibus_cangjie/engine.py", line 343, in do_process_key_event
if c and self.cangjie.is_input_key(c):
^^^^^^^^^^^^
AttributeError: 'EngineCangjie' object has no attribute 'cangjie'
Cause
- The currently shipped database file, as specified here, is installed "/usr/share/libcangjie/cangjie.db".
- The current default build commands, using meson, was specified as
MESON_ARGS
here then used here - Effectively, the setup command would be:
meson setup -Db_coverage=True --prefix=/usr builddir
- According to this line, the CANGJIE_DB variable will be created either from
get_option('prefix') / get_option('datadir') / 'cangjie.db'
. - The resulting
config.h
will be like this:/* * Autogenerated by the Meson build system. * Do not edit, your changes will be lost. */ #pragma once #define CANGJIE_DB "/usr/share/cangjie.db" #define PACKAGE_VERSION "1.3.1"
- Thus the default location for the libcangjie binary to search for database would be "/usr/share/cangjie.db" instead of "/usr/share/libcangjie/cangjie.db".
Edited by Koala Yeung