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

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

Open
formula-spectre opened this issue May 6, 2024 · 11 comments

Comments

@formula-spectre
Copy link

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
Copy link
Owner

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
Copy link
Author

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

@formula-spectre
Copy link
Author

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
Copy link
Author

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
Copy link
Owner

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
Copy link
Owner

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

@formula-spectre
Copy link
Author

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

@formula-spectre
Copy link
Author

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
Copy link
Owner

I've added some additional log in d32e9db 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
Copy link
Owner

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
Copy link
Author

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

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