FirelightFlagboy / plover-wayland-nix

A nix flake to provide plover on wayland
1 stars 2 forks source link

AttributeError: 'KeyboardEmulation' object has no attribute 'set_key_press_delay' #1

Open formula-spectre opened 4 months ago

formula-spectre commented 4 months ago

i'm trying to make plover work on sway, but after nix run .#plover-dotool and enabling the plugin, I get these errors:

2024-05-06 19:28:49,022 [MainThread] WARNING: Qt: EGL not available
2024-05-06 19:28:57,829 [MainThread] WARNING: Qt: Wayland does not support QWindow::requestActivate()
2024-05-06 19:29:00,879 [Dummy-1] ERROR: engine update failed
Traceback (most recent call last):
  File "/nix/store/y222vs5410vybmpv6fbdnjikggv9ccm3-python3.10-plover-4.0.0rc2/lib/python3.10/site-packages/plover/engine.py", line 147, in run
    if func(*args, **kwargs):
  File "/nix/store/y222vs5410vybmpv6fbdnjikggv9ccm3-python3.10-plover-4.0.0rc2/lib/python3.10/site-packages/plover/engine.py", line 214, in _update
    self._keyboard_emulation.set_key_press_delay(config['time_between_key_presses'])
AttributeError: 'KeyboardEmulation' object has no attribute 'set_key_press_delay'

why?

FirelightFlagboy commented 4 months ago

Hello, it's likely a problem with the configuration of plover.

Could you try removing the files ~/.config/plover/plover.cfg and ~/.config/plover/user.json ? You will then need to reconfigure plover

formula-spectre commented 4 months ago

Famous-Movie-Qoutes-1984-Terminator-Ill-be-back-250138902 i'll try it asap, ty!

formula-spectre commented 4 months ago

nope

rm -rvf ~/.config/plover
nix run .#plover-dotool
2024-05-08 06:29:16,923 [MainThread] WARNING: Qt: EGL not available
2024-05-08 06:29:25,182 [MainThread] WARNING: Qt: Wayland does not support QWindow::requestActivate()
2024-05-08 06:29:34,064 [MainThread] WARNING: Qt: Wayland does not support QWindow::requestActivate()
2024-05-08 06:29:38,322 [Dummy-1] ERROR: engine update failed
Traceback (most recent call last):
  File "/nix/store/y222vs5410vybmpv6fbdnjikggv9ccm3-python3.10-plover-4.0.0rc2/lib/python3.10/site-packages/plover/engine.py", line 147, in run
    if func(*args, **kwargs):
  File "/nix/store/y222vs5410vybmpv6fbdnjikggv9ccm3-python3.10-plover-4.0.0rc2/lib/python3.10/site-packages/plover/engine.py", line 214, in _update
    self._keyboard_emulation.set_key_press_delay(config['time_between_key_presses'])
AttributeError: 'KeyboardEmulation' object has no attribute 'set_key_press_delay'
2024-05-08 06:29:40,363 [Dummy-1] ERROR: engine update failed
Traceback (most recent call last):
  File "/nix/store/y222vs5410vybmpv6fbdnjikggv9ccm3-python3.10-plover-4.0.0rc2/lib/python3.10/site-packages/plover/engine.py", line 147, in run
    if func(*args, **kwargs):
  File "/nix/store/y222vs5410vybmpv6fbdnjikggv9ccm3-python3.10-plover-4.0.0rc2/lib/python3.10/site-packages/plover/engine.py", line 214, in _update
    self._keyboard_emulation.set_key_press_delay(config['time_between_key_presses'])
AttributeError: 'KeyboardEmulation' object has no attribute 'set_key_press_delay'
formula-spectre commented 3 months ago

update:
I tried, after a nix-collect-garbage -d a nix develop, launched plover and tested both flavors, but nothing, I keep getting that error. why is that? do I need some regression?

FirelightFlagboy commented 3 months ago

I'm able to reproduce the error when I'm configuring plover in keyboard mode, usually I run plover in Gemini PR mode with a compatible keyboard

FirelightFlagboy commented 3 months ago

I only get the error when I change the mode, it's something that also happens to you ?

formula-spectre commented 3 months ago

nope, it happens when I toggle the output of plover on or "refresh"

formula-spectre commented 3 months ago

I'm able to reproduce the error when I'm configuring plover in keyboard mode, usually I run plover in Gemini PR mode with a compatible keyboard

ah I forgot to mention, i'm using Plover as a keyboard emulation, I don't have a steno kb (yet)

FirelightFlagboy commented 3 months ago

I've added some additional log in d32e9dbf873ca9652820c1d0408a2f3018279fe2 and run plover with

nix run .#plover-dotool -- --log-level info

Above the error I get the following log:

2024-05-13 18:26:41,698 [Dummy-1] INFO: Update Steno Engine, current keyboard: <plover_output_dotool.KeyboardEmulation object at 0x7f7c1150ed70> (<class 'plover_output_dotool.KeyboardEmulation'>)

That seems to indicate that the issue is with plover-dotool

FirelightFlagboy commented 3 months ago

I've a patch that resolve the error but I seems the keyboard mode don't work :/

Could you try the draft #2 ?

formula-spectre commented 3 months ago

I've a patch that resolve the error but I seems the keyboard mode don't work :/

Could you try the draft #2 ?

indeed; I don't get the error anymore, but keyboard mode does not work indeed, it works as a qwerty kb. is this a sign that I have to get a steno kb asap? /j