Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange fix needed for NixOS #8

Closed
laMudri opened this issue May 19, 2019 · 2 comments
Closed

Strange fix needed for NixOS #8

laMudri opened this issue May 19, 2019 · 2 comments

Comments

@laMudri
Copy link

laMudri commented May 19, 2019

I've been trying to fix issues with the ibus-table package for NixOS after the recent update (1.9.21). One is that changing to a table-based IM fails, printing this to ~/.cache/ibus-table/debug.log:

Compatible database /home/james/.local/share/ibus-table/tables/ipa-x-sampa-user.db found.
Connect to the database /home/james/.local/share/ibus-table/tables/ipa-x-sampa-user.db.
failed to create engine ipa-x-sampa
Traceback (most recent call last):
  File "/nix/store/2rnlpn71v7mds7qfn9nk40csj913v38s-ibus-table-1.9.21/share/ibus-table/engine/factory.py", line 84, in do_create_engine
    self.dbdict[engine_name])
  File "/nix/store/2rnlpn71v7mds7qfn9nk40csj913v38s-ibus-table-1.9.21/share/ibus-table/engine/table.py", line 1545, in __init__
    self.db)
  File "/nix/store/2rnlpn71v7mds7qfn9nk40csj913v38s-ibus-table-1.9.21/share/ibus-table/engine/table.py", line 358, in __init__
    orientation=self._orientation)
  File "/nix/store/2rnlpn71v7mds7qfn9nk40csj913v38s-ibus-table-1.9.21/share/ibus-table/engine/table.py", line 410, in get_new_lookup_table
    round=True)
TypeError: gobject `IBusLookupTable' doesn't support property `page_size'
Traceback (most recent call last):
  File "/nix/store/2rnlpn71v7mds7qfn9nk40csj913v38s-ibus-table-1.9.21/share/ibus-table/engine/factory.py", line 84, in do_create_engine
    self.dbdict[engine_name])
  File "/nix/store/2rnlpn71v7mds7qfn9nk40csj913v38s-ibus-table-1.9.21/share/ibus-table/engine/table.py", line 1545, in __init__
    self.db)
  File "/nix/store/2rnlpn71v7mds7qfn9nk40csj913v38s-ibus-table-1.9.21/share/ibus-table/engine/table.py", line 358, in __init__
    orientation=self._orientation)
  File "/nix/store/2rnlpn71v7mds7qfn9nk40csj913v38s-ibus-table-1.9.21/share/ibus-table/engine/table.py", line 410, in get_new_lookup_table
    round=True)
TypeError: gobject `IBusLookupTable' doesn't support property `page_size'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/nix/store/2rnlpn71v7mds7qfn9nk40csj913v38s-ibus-table-1.9.21/share/ibus-table/engine/factory.py", line 92, in do_create_engine
    raise Exception("Cannot create engine %s from %s" % (engine_name, db_dir))
Exception: Cannot create engine ipa-x-sampa from /nix/store/1mvij9fb4nppjc2cfwfkklp33qsnhkx9-ibus-with-plugins-1.5.20/share/ibus-table/tables

(Ignore the slight difference from usual in the last raise Exception line. I added a little bit for debugging.)

A fix to this appears to be to edit this line so that it calls IBus.LookupTable.new rather than IBus.LookupTable. This is what ibus-anthy does.

This fix seems to work perfectly well, but it makes me surprised that ibus-table isn't broken on other systems. I would prefer to understand what's going on, too. For example, LookupTable.py doesn't have a new method, so it surprises me that this works.

Some more details may be found in this issue thread (not all relevant).

@jtojnar
Copy link

jtojnar commented Jun 1, 2019

LookupTable.py is from Python 2 bindings, ibus-table uses gobject-introspection-generated bindings:

https://lazka.github.io/pgi-docs/IBus-1.0/classes/LookupTable.html#IBus.LookupTable

@laMudri
Copy link
Author

laMudri commented Aug 20, 2019

Fixed downstream (NixOS/nixpkgs#61978).

@laMudri laMudri closed this as completed Aug 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants