openstenoproject / plover

Open source stenotype engine
http://opensteno.org/plover
GNU General Public License v2.0
2.34k stars 281 forks source link

As non-root user, serial port is not found and is None #1490

Closed arunisaac closed 2 years ago

arunisaac commented 2 years ago

Describe the bug

When I start plover as a non-root user, I am not able to connect to my stenokeyboard (I am using a Stenokey). I see the following error message in the terminal.

2022-02-23 11:50:22,583 [Dummy-1] WARNING: Serial port is not open: None

However, as a non-root user, everything works fine. This is not a problem with permissions for the serial port. I checked by hard-coding the serial port (/dev/ttyACM0 in my case) in the code, and it worked fine. If you could point me to the relevant parts of the source code that scan for the serial port, I'd be happy to send a PR fixing this bug. I tried debugging the plover source code for many hours, but couldn't make progress. The plugin and queue architecture make it hard to debug. For my immediate use, I am going to work around this bug by hard-coding the serial port into the source code.

To Reproduce

Steps to reproduce the behavior:

  1. Plug in the stenokeyboard on USB.
  2. Start plover.
  3. In the main window, select TX Bolt in the Machine drop-down menu.
  4. See Serial port is not open: None warning in the terminal.

Expected behavior

Plover initializes and connects to the TX Bolt machine.

Operating system

Hardware

Stenokey

user202729 commented 2 years ago

Yes, known issue. Follow the instruction in https://github.com/openstenoproject/plover/wiki/Installation-Guide#allowing-access-to-serial-ports

user202729 commented 2 years ago

On further read, maybe not...

Anyway, currently if you know the port name (/dev/tty-something), just type it in the text box. No need to modify code.

The code used for listing ports is https://github.com/openstenoproject/plover/blob/bdf0800ce73771c8706c58a74fc1052b4258f81c/plover/gui_qt/machine_options.py#L64 . The code uses the serial library directly.

arunisaac commented 2 years ago

Yes, I'm already a member of the dialout group, and /dev/ttyACM0 is owned by the dialout group on my distro.

The code snippet you referred to scans serial ports in the "machine options" dialog. And, there it seems to find /dev/ttyACM0 without any problems. See attached screenshot. But, from there, the port name somehow doesn't reach the part of the code that actually talks to the serial port. Here is what I see on my terminal. plover reports DBus errors and crashes soon after.

2022-02-23 15:49:47,644 [Dummy-1] WARNING: Serial port is not open: None
ERROR:dbus.proxies:Introspect error on :1.1:/org/freedesktop/Notifications: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
2022-02-23 15:50:37,674 [Dummy-1] ERROR: engine start failed
Traceback (most recent call last):
  File "/gnu/store/25nbgpvr9p91galhcazvg8g0am3vad2n-plover-4.0.0.dev8/lib/python3.9/site-packages/plover/engine.py", line 136, in run
    if func(*args, **kwargs):
  File "/gnu/store/25nbgpvr9p91galhcazvg8g0am3vad2n-plover-4.0.0.dev8/lib/python3.9/site-packages/plover/engine.py", line 149, in _start
    self._update(full=True)
  File "/gnu/store/25nbgpvr9p91galhcazvg8g0am3vad2n-plover-4.0.0.dev8/lib/python3.9/site-packages/plover/engine.py", line 230, in _update
    self._machine.start_capture()
  File "/gnu/store/25nbgpvr9p91galhcazvg8g0am3vad2n-plover-4.0.0.dev8/lib/python3.9/site-packages/plover/machine/base.py", line 218, in start_capture
    log.warning('Serial port is not open: %s', self.serial_params.get('port'))
  File "/gnu/store/mhbnni58w5hvpr304jxc5kws1vrp2l1i-python-3.9.9/lib/python3.9/logging/__init__.py", line 1458, in warning
    self._log(WARNING, msg, args, **kwargs)
  File "/gnu/store/mhbnni58w5hvpr304jxc5kws1vrp2l1i-python-3.9.9/lib/python3.9/logging/__init__.py", line 1589, in _log
    self.handle(record)
  File "/gnu/store/mhbnni58w5hvpr304jxc5kws1vrp2l1i-python-3.9.9/lib/python3.9/logging/__init__.py", line 1599, in handle
    self.callHandlers(record)
  File "/gnu/store/mhbnni58w5hvpr304jxc5kws1vrp2l1i-python-3.9.9/lib/python3.9/logging/__init__.py", line 1661, in callHandlers
    hdlr.handle(record)
  File "/gnu/store/mhbnni58w5hvpr304jxc5kws1vrp2l1i-python-3.9.9/lib/python3.9/logging/__init__.py", line 952, in handle
    self.emit(record)
  File "/gnu/store/25nbgpvr9p91galhcazvg8g0am3vad2n-plover-4.0.0.dev8/lib/python3.9/site-packages/plover/oslayer/log_dbus.py", line 42, in emit
    self._notify.Notify(APPNAME, 0, APPICON,  # app_name, replaces_id, app_icon
  File "/gnu/store/zkrmszsyfvw78qfhx73r4arav1drgizg-python-dbus-1.2.18/lib/python3.9/site-packages/dbus/proxies.py", line 72, in __call__
    return self._proxy_method(*args, **keywords)
  File "/gnu/store/zkrmszsyfvw78qfhx73r4arav1drgizg-python-dbus-1.2.18/lib/python3.9/site-packages/dbus/proxies.py", line 141, in __call__
    return self._connection.call_blocking(self._named_service,
  File "/gnu/store/zkrmszsyfvw78qfhx73r4arav1drgizg-python-dbus-1.2.18/lib/python3.9/site-packages/dbus/connection.py", line 652, in call_blocking
    reply_message = self.send_message_with_reply_and_block(
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Traceback (most recent call last):
  File "/gnu/store/25nbgpvr9p91galhcazvg8g0am3vad2n-plover-4.0.0.dev8/lib/python3.9/site-packages/plover/engine.py", line 136, in run
    if func(*args, **kwargs):
  File "/gnu/store/25nbgpvr9p91galhcazvg8g0am3vad2n-plover-4.0.0.dev8/lib/python3.9/site-packages/plover/engine.py", line 149, in _start
    self._update(full=True)
  File "/gnu/store/25nbgpvr9p91galhcazvg8g0am3vad2n-plover-4.0.0.dev8/lib/python3.9/site-packages/plover/engine.py", line 230, in _update
    self._machine.start_capture()
  File "/gnu/store/25nbgpvr9p91galhcazvg8g0am3vad2n-plover-4.0.0.dev8/lib/python3.9/site-packages/plover/machine/base.py", line 218, in start_capture
    log.warning('Serial port is not open: %s', self.serial_params.get('port'))
  File "/gnu/store/mhbnni58w5hvpr304jxc5kws1vrp2l1i-python-3.9.9/lib/python3.9/logging/__init__.py", line 1458, in warning
    self._log(WARNING, msg, args, **kwargs)
  File "/gnu/store/mhbnni58w5hvpr304jxc5kws1vrp2l1i-python-3.9.9/lib/python3.9/logging/__init__.py", line 1589, in _log
    self.handle(record)
  File "/gnu/store/mhbnni58w5hvpr304jxc5kws1vrp2l1i-python-3.9.9/lib/python3.9/logging/__init__.py", line 1599, in handle
    self.callHandlers(record)
  File "/gnu/store/mhbnni58w5hvpr304jxc5kws1vrp2l1i-python-3.9.9/lib/python3.9/logging/__init__.py", line 1661, in callHandlers
    hdlr.handle(record)
  File "/gnu/store/mhbnni58w5hvpr304jxc5kws1vrp2l1i-python-3.9.9/lib/python3.9/logging/__init__.py", line 952, in handle
    self.emit(record)
  File "/gnu/store/25nbgpvr9p91galhcazvg8g0am3vad2n-plover-4.0.0.dev8/lib/python3.9/site-packages/plover/oslayer/log_dbus.py", line 42, in emit
    self._notify.Notify(APPNAME, 0, APPICON,  # app_name, replaces_id, app_icon
  File "/gnu/store/zkrmszsyfvw78qfhx73r4arav1drgizg-python-dbus-1.2.18/lib/python3.9/site-packages/dbus/proxies.py", line 72, in __call__
    return self._proxy_method(*args, **keywords)
  File "/gnu/store/zkrmszsyfvw78qfhx73r4arav1drgizg-python-dbus-1.2.18/lib/python3.9/site-packages/dbus/proxies.py", line 141, in __call__
    return self._connection.call_blocking(self._named_service,
  File "/gnu/store/zkrmszsyfvw78qfhx73r4arav1drgizg-python-dbus-1.2.18/lib/python3.9/site-packages/dbus/connection.py", line 652, in call_blocking
    reply_message = self.send_message_with_reply_and_block(
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/gnu/store/25nbgpvr9p91galhcazvg8g0am3vad2n-plover-4.0.0.dev8/lib/python3.9/site-packages/plover/gui_qt/engine.py", line 56, in run
    super().run()
  File "/gnu/store/25nbgpvr9p91galhcazvg8g0am3vad2n-plover-4.0.0.dev8/lib/python3.9/site-packages/plover/engine.py", line 139, in run
    log.error('engine %s failed', func.__name__[1:], exc_info=True)
  File "/gnu/store/mhbnni58w5hvpr304jxc5kws1vrp2l1i-python-3.9.9/lib/python3.9/logging/__init__.py", line 1475, in error
    self._log(ERROR, msg, args, **kwargs)
  File "/gnu/store/mhbnni58w5hvpr304jxc5kws1vrp2l1i-python-3.9.9/lib/python3.9/logging/__init__.py", line 1589, in _log
    self.handle(record)
  File "/gnu/store/mhbnni58w5hvpr304jxc5kws1vrp2l1i-python-3.9.9/lib/python3.9/logging/__init__.py", line 1599, in handle
    self.callHandlers(record)
  File "/gnu/store/mhbnni58w5hvpr304jxc5kws1vrp2l1i-python-3.9.9/lib/python3.9/logging/__init__.py", line 1661, in callHandlers
    hdlr.handle(record)
  File "/gnu/store/mhbnni58w5hvpr304jxc5kws1vrp2l1i-python-3.9.9/lib/python3.9/logging/__init__.py", line 952, in handle
    self.emit(record)
  File "/gnu/store/25nbgpvr9p91galhcazvg8g0am3vad2n-plover-4.0.0.dev8/lib/python3.9/site-packages/plover/oslayer/log_dbus.py", line 42, in emit
    self._notify.Notify(APPNAME, 0, APPICON,  # app_name, replaces_id, app_icon
  File "/gnu/store/zkrmszsyfvw78qfhx73r4arav1drgizg-python-dbus-1.2.18/lib/python3.9/site-packages/dbus/proxies.py", line 141, in __call__
    return self._connection.call_blocking(self._named_service,
  File "/gnu/store/zkrmszsyfvw78qfhx73r4arav1drgizg-python-dbus-1.2.18/lib/python3.9/site-packages/dbus/connection.py", line 652, in call_blocking
    reply_message = self.send_message_with_reply_and_block(
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

machine-options

user202729 commented 2 years ago

I think this is not really an issue with the serial port scanning, rather it's because somehow it cannot send message to DBus, thus raise an exception and interrupt the GUI code.

Try running e.g. notify-send a from the terminal. You should be able to see a message appear somewhere.

Perhaps Plover could have some way for the user to turn off DBus notify, however.

Try to disable dbus (either by

and see if the error disappear. If it does, then the serial port scanning is not an issue. Keep an eye on the terminal for warning messages in that case, though.

benoit-pierre commented 2 years ago

@arunisaac: Start from a clean state; the easiest way is to use Plover's portable mode: in a temporary directory, create an empty config (touch plover.cfg), then start plover with traces plover -l debug.

@user202729:

I think this is not really an issue with the serial port scanning, rather it's because somehow it cannot send message to DBus, thus raise an exception and interrupt the GUI code.

No, the dbus error happen after the attempt at opening the serial port.

benoit-pierre commented 2 years ago

How did you install Plover?

arunisaac commented 2 years ago

After commenting out the relevant lines in plover/oslayer/log_dbus.py, the dbus errors do go away and plover no longer crashes. But, the Serial port is not open: None warning still remains, and the machine state in the main window is Disconnected.

I installed plover 4.0.0.dev8 using the package provided by my distro (GNU Guix). I also tried running directly from the source tarball for the same version. After touch plover.cfg in a temporary directory, and with ./launch.sh -l debug from the source checkout, I get the following debug log.

running launch
running build_py
running build_ui
running egg_info
writing plover.egg-info/PKG-INFO
writing dependency_links to plover.egg-info/dependency_links.txt
writing entry points to plover.egg-info/entry_points.txt
writing requirements to plover.egg-info/requires.txt
writing top-level names to plover.egg-info/top_level.txt
listing git files failed - pretending there aren't any
reading manifest file 'plover.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'tox.ini'
warning: no previously-included files found matching '*.yml'
warning: no previously-included files found matching '.gitignore'
warning: no previously-included files found matching 'plover/gui_qt/.gitignore'
no previously-included directories found matching '.github'
no previously-included directories found matching 'ci'
adding license file 'LICENSE.txt'
writing manifest file 'plover.egg-info/SOURCES.txt'
generating plover/gui_qt/resources_rc.py
running compile_catalog
compiling catalog plover/gui_qt/messages/fr/LC_MESSAGES/plover.po to plover/gui_qt/messages/fr/LC_MESSAGES/plover.mo
copying plover/gui_qt/resources_rc.py -> build/lib/plover/gui_qt
running build_ext
2022-02-23 22:49:36,944 [MainThread] INFO: Plover 4.0.0.dev8
2022-02-23 22:49:36,944 [MainThread] INFO: configuration directory: /tmp/plover-checkout
2022-02-23 22:49:36,951 [MainThread] INFO: dictionary: json (from plover 4.0.0.dev8 in /tmp/plover-checkout)
2022-02-23 22:49:37,015 [MainThread] INFO: dictionary: rtf (from plover 4.0.0.dev8 in /tmp/plover-checkout)
2022-02-23 22:49:37,022 [MainThread] INFO: gui: none (from plover 4.0.0.dev8 in /tmp/plover-checkout)
2022-02-23 22:49:37,070 [MainThread] INFO: gui: qt (from plover 4.0.0.dev8 in /tmp/plover-checkout)
2022-02-23 22:49:37,139 [MainThread] INFO: gui.qt.machine_option: plover.machine.base:SerialStenotypeBase (from plover 4.0.0.dev8 in /tmp/plover-checkout)
2022-02-23 22:49:37,148 [MainThread] INFO: gui.qt.machine_option: plover.machine.keyboard:Keyboard (from plover 4.0.0.dev8 in /tmp/plover-checkout)
2022-02-23 22:49:37,150 [MainThread] INFO: gui.qt.tool: add_translation (from plover 4.0.0.dev8 in /tmp/plover-checkout)
2022-02-23 22:49:37,159 [MainThread] INFO: gui.qt.tool: lookup (from plover 4.0.0.dev8 in /tmp/plover-checkout)
2022-02-23 22:49:37,162 [MainThread] INFO: gui.qt.tool: paper_tape (from plover 4.0.0.dev8 in /tmp/plover-checkout)
2022-02-23 22:49:37,170 [MainThread] INFO: gui.qt.tool: suggestions (from plover 4.0.0.dev8 in /tmp/plover-checkout)
2022-02-23 22:49:37,173 [MainThread] INFO: machine: Gemini PR (from plover 4.0.0.dev8 in /tmp/plover-checkout)
2022-02-23 22:49:37,177 [MainThread] INFO: machine: Keyboard (from plover 4.0.0.dev8 in /tmp/plover-checkout)
2022-02-23 22:49:37,178 [MainThread] INFO: machine: Passport (from plover 4.0.0.dev8 in /tmp/plover-checkout)
2022-02-23 22:49:37,180 [MainThread] INFO: machine: ProCAT (from plover 4.0.0.dev8 in /tmp/plover-checkout)
2022-02-23 22:49:37,182 [MainThread] INFO: machine: Stentura (from plover 4.0.0.dev8 in /tmp/plover-checkout)
2022-02-23 22:49:37,184 [MainThread] INFO: machine: TX Bolt (from plover 4.0.0.dev8 in /tmp/plover-checkout)
2022-02-23 22:49:37,186 [MainThread] INFO: macro: repeat_last_stroke (from plover 4.0.0.dev8 in /tmp/plover-checkout)
2022-02-23 22:49:37,187 [MainThread] INFO: macro: retrospective_delete_space (from plover 4.0.0.dev8 in /tmp/plover-checkout)
2022-02-23 22:49:37,189 [MainThread] INFO: macro: retrospective_insert_space (from plover 4.0.0.dev8 in /tmp/plover-checkout)
2022-02-23 22:49:37,190 [MainThread] INFO: macro: retrospective_toggle_asterisk (from plover 4.0.0.dev8 in /tmp/plover-checkout)
2022-02-23 22:49:37,192 [MainThread] INFO: macro: undo (from plover 4.0.0.dev8 in /tmp/plover-checkout)
2022-02-23 22:49:37,194 [MainThread] INFO: system: English Stenotype (from plover 4.0.0.dev8 in /tmp/plover-checkout)
2022-02-23 22:49:37,197 [MainThread] INFO: setting language to: ta_IN.utf8
2022-02-23 22:49:37,272 [MainThread] DEBUG: keymap:
2022-02-23 22:49:37,276 [MainThread] DEBUG: 9:0=ff1b[]
2022-02-23 22:49:37,276 [MainThread] DEBUG: 10:0=31[1]
2022-02-23 22:49:37,276 [MainThread] DEBUG: 10:1=21[!]
2022-02-23 22:49:37,277 [MainThread] DEBUG: 11:0=32[2]
2022-02-23 22:49:37,277 [MainThread] DEBUG: 11:1=40[@]
2022-02-23 22:49:37,277 [MainThread] DEBUG: 12:0=33[3]
2022-02-23 22:49:37,277 [MainThread] DEBUG: 12:1=23[#]
2022-02-23 22:49:37,278 [MainThread] DEBUG: 13:0=34[4]
2022-02-23 22:49:37,278 [MainThread] DEBUG: 13:1=24[$]
2022-02-23 22:49:37,278 [MainThread] DEBUG: 14:0=35[5]
2022-02-23 22:49:37,278 [MainThread] DEBUG: 14:1=25[%]
2022-02-23 22:49:37,278 [MainThread] DEBUG: 15:0=36[6]
2022-02-23 22:49:37,279 [MainThread] DEBUG: 15:1=5e[^]
2022-02-23 22:49:37,279 [MainThread] DEBUG: 16:0=37[7]
2022-02-23 22:49:37,279 [MainThread] DEBUG: 16:1=26[&]
2022-02-23 22:49:37,279 [MainThread] DEBUG: 17:0=38[8]
2022-02-23 22:49:37,279 [MainThread] DEBUG: 17:1=2a[*]
2022-02-23 22:49:37,280 [MainThread] DEBUG: 18:0=39[9]
2022-02-23 22:49:37,280 [MainThread] DEBUG: 19:0=30[0]
2022-02-23 22:49:37,280 [MainThread] DEBUG: 20:0=2d[-]
2022-02-23 22:49:37,280 [MainThread] DEBUG: 20:1=5f[_]
2022-02-23 22:49:37,280 [MainThread] DEBUG: 21:0=3d[=]
2022-02-23 22:49:37,281 [MainThread] DEBUG: 21:1=2b[+]
2022-02-23 22:49:37,281 [MainThread] DEBUG: 22:0=ff08[]
2022-02-23 22:49:37,281 [MainThread] DEBUG: 23:0=ff09[  ]
2022-02-23 22:49:37,281 [MainThread] DEBUG: 23:1=fe20[]
2022-02-23 22:49:37,282 [MainThread] DEBUG: 24:0=71[q]
2022-02-23 22:49:37,282 [MainThread] DEBUG: 24:1=51[Q]
2022-02-23 22:49:37,282 [MainThread] DEBUG: 25:0=77[w]
2022-02-23 22:49:37,282 [MainThread] DEBUG: 25:1=57[W]
2022-02-23 22:49:37,282 [MainThread] DEBUG: 26:0=65[e]
2022-02-23 22:49:37,283 [MainThread] DEBUG: 26:1=45[E]
2022-02-23 22:49:37,283 [MainThread] DEBUG: 27:0=72[r]
2022-02-23 22:49:37,283 [MainThread] DEBUG: 27:1=52[R]
2022-02-23 22:49:37,283 [MainThread] DEBUG: 28:0=74[t]
2022-02-23 22:49:37,284 [MainThread] DEBUG: 28:1=54[T]
2022-02-23 22:49:37,284 [MainThread] DEBUG: 29:0=79[y]
2022-02-23 22:49:37,284 [MainThread] DEBUG: 29:1=59[Y]
2022-02-23 22:49:37,284 [MainThread] DEBUG: 30:0=75[u]
2022-02-23 22:49:37,284 [MainThread] DEBUG: 30:1=55[U]
2022-02-23 22:49:37,285 [MainThread] DEBUG: 31:0=69[i]
2022-02-23 22:49:37,285 [MainThread] DEBUG: 31:1=49[I]
2022-02-23 22:49:37,285 [MainThread] DEBUG: 32:0=6f[o]
2022-02-23 22:49:37,286 [MainThread] DEBUG: 32:1=4f[O]
2022-02-23 22:49:37,286 [MainThread] DEBUG: 33:0=70[p]
2022-02-23 22:49:37,286 [MainThread] DEBUG: 33:1=50[P]
2022-02-23 22:49:37,286 [MainThread] DEBUG: 34:0=5b[[]
2022-02-23 22:49:37,286 [MainThread] DEBUG: 34:1=7b[{]
2022-02-23 22:49:37,286 [MainThread] DEBUG: 35:0=5d[]]
2022-02-23 22:49:37,287 [MainThread] DEBUG: 35:1=7d[}]
]
2022-02-23 22:49:37,287 [MainThread] DEBUG: 37:0=ffe3[]
2022-02-23 22:49:37,287 [MainThread] DEBUG: 38:0=61[a]
2022-02-23 22:49:37,288 [MainThread] DEBUG: 38:1=41[A]
2022-02-23 22:49:37,288 [MainThread] DEBUG: 39:0=73[s]
2022-02-23 22:49:37,288 [MainThread] DEBUG: 39:1=53[S]
2022-02-23 22:49:37,289 [MainThread] DEBUG: 40:0=64[d]
2022-02-23 22:49:37,290 [MainThread] DEBUG: 40:1=44[D]
2022-02-23 22:49:37,290 [MainThread] DEBUG: 41:0=66[f]
2022-02-23 22:49:37,291 [MainThread] DEBUG: 41:1=46[F]
2022-02-23 22:49:37,291 [MainThread] DEBUG: 42:0=67[g]
2022-02-23 22:49:37,291 [MainThread] DEBUG: 42:1=47[G]
2022-02-23 22:49:37,292 [MainThread] DEBUG: 43:0=68[h]
2022-02-23 22:49:37,292 [MainThread] DEBUG: 43:1=48[H]
2022-02-23 22:49:37,292 [MainThread] DEBUG: 44:0=6a[j]
2022-02-23 22:49:37,292 [MainThread] DEBUG: 44:1=4a[J]
2022-02-23 22:49:37,292 [MainThread] DEBUG: 45:0=6b[k]
2022-02-23 22:49:37,293 [MainThread] DEBUG: 45:1=4b[K]
2022-02-23 22:49:37,293 [MainThread] DEBUG: 46:0=6c[l]
2022-02-23 22:49:37,293 [MainThread] DEBUG: 46:1=4c[L]
2022-02-23 22:49:37,294 [MainThread] DEBUG: 47:0=3b[;]
2022-02-23 22:49:37,294 [MainThread] DEBUG: 47:1=3a[:]
2022-02-23 22:49:37,294 [MainThread] DEBUG: 48:0=27[']
2022-02-23 22:49:37,294 [MainThread] DEBUG: 48:1=22["]
2022-02-23 22:49:37,294 [MainThread] DEBUG: 49:0=60[`]
2022-02-23 22:49:37,295 [MainThread] DEBUG: 49:1=7e[~]
2022-02-23 22:49:37,295 [MainThread] DEBUG: 50:0=ffe1[]
2022-02-23 22:49:37,295 [MainThread] DEBUG: 51:0=5c[\]
2022-02-23 22:49:37,295 [MainThread] DEBUG: 51:1=7c[|]
2022-02-23 22:49:37,295 [MainThread] DEBUG: 52:0=7a[z]
2022-02-23 22:49:37,296 [MainThread] DEBUG: 52:1=5a[Z]
2022-02-23 22:49:37,296 [MainThread] DEBUG: 53:0=78[x]
2022-02-23 22:49:37,296 [MainThread] DEBUG: 53:1=58[X]
2022-02-23 22:49:37,296 [MainThread] DEBUG: 54:0=63[c]
2022-02-23 22:49:37,296 [MainThread] DEBUG: 54:1=43[C]
2022-02-23 22:49:37,297 [MainThread] DEBUG: 55:0=76[v]
2022-02-23 22:49:37,297 [MainThread] DEBUG: 55:1=56[V]
2022-02-23 22:49:37,297 [MainThread] DEBUG: 56:0=62[b]
2022-02-23 22:49:37,297 [MainThread] DEBUG: 56:1=42[B]
2022-02-23 22:49:37,297 [MainThread] DEBUG: 57:0=6e[n]
2022-02-23 22:49:37,298 [MainThread] DEBUG: 57:1=4e[N]
2022-02-23 22:49:37,298 [MainThread] DEBUG: 58:0=6d[m]
2022-02-23 22:49:37,298 [MainThread] DEBUG: 58:1=4d[M]
2022-02-23 22:49:37,298 [MainThread] DEBUG: 59:0=2c[,]
2022-02-23 22:49:37,298 [MainThread] DEBUG: 60:0=2e[.]
2022-02-23 22:49:37,299 [MainThread] DEBUG: 60:1=3e[>]
2022-02-23 22:49:37,299 [MainThread] DEBUG: 61:0=2f[/]
2022-02-23 22:49:37,299 [MainThread] DEBUG: 61:1=3f[?]
2022-02-23 22:49:37,299 [MainThread] DEBUG: 62:0=ffe2[]
2022-02-23 22:49:37,299 [MainThread] DEBUG: 63:0=ffaa[]
2022-02-23 22:49:37,300 [MainThread] DEBUG: 64:0=ffe9[]
2022-02-23 22:49:37,300 [MainThread] DEBUG: 64:1=ffe7[]
2022-02-23 22:49:37,300 [MainThread] DEBUG: 65:0=20[ ]
2022-02-23 22:49:37,300 [MainThread] DEBUG: 66:0=ffe5[]
2022-02-23 22:49:37,300 [MainThread] DEBUG: 67:0=ffbe[]
2022-02-23 22:49:37,301 [MainThread] DEBUG: 68:0=ffbf[]
2022-02-23 22:49:37,301 [MainThread] DEBUG: 69:0=ffc0[]
2022-02-23 22:49:37,301 [MainThread] DEBUG: 70:0=ffc1[]
2022-02-23 22:49:37,302 [MainThread] DEBUG: 71:0=ffc2[]
2022-02-23 22:49:37,302 [MainThread] DEBUG: 72:0=ffc3[]
2022-02-23 22:49:37,302 [MainThread] DEBUG: 73:0=ffc4[]
2022-02-23 22:49:37,302 [MainThread] DEBUG: 74:0=ffc5[]
2022-02-23 22:49:37,302 [MainThread] DEBUG: 75:0=ffc6[]
2022-02-23 22:49:37,303 [MainThread] DEBUG: 76:0=ffc7[]
2022-02-23 22:49:37,303 [MainThread] DEBUG: 77:0=ff7f[]
2022-02-23 22:49:37,303 [MainThread] DEBUG: 78:0=ff14[]
2022-02-23 22:49:37,303 [MainThread] DEBUG: 79:0=ff95[]
2022-02-23 22:49:37,303 [MainThread] DEBUG: 79:1=ffb7[]
2022-02-23 22:49:37,304 [MainThread] DEBUG: 80:0=ff97[]
2022-02-23 22:49:37,304 [MainThread] DEBUG: 80:1=ffb8[]
2022-02-23 22:49:37,304 [MainThread] DEBUG: 81:0=ff9a[]
2022-02-23 22:49:37,304 [MainThread] DEBUG: 81:1=ffb9[]
2022-02-23 22:49:37,304 [MainThread] DEBUG: 82:0=ffad[]
2022-02-23 22:49:37,305 [MainThread] DEBUG: 83:0=ff96[]
2022-02-23 22:49:37,305 [MainThread] DEBUG: 83:1=ffb4[]
2022-02-23 22:49:37,305 [MainThread] DEBUG: 84:0=ff9d[]
2022-02-23 22:49:37,305 [MainThread] DEBUG: 84:1=ffb5[]
2022-02-23 22:49:37,305 [MainThread] DEBUG: 85:0=ff98[]
2022-02-23 22:49:37,306 [MainThread] DEBUG: 85:1=ffb6[]
2022-02-23 22:49:37,306 [MainThread] DEBUG: 86:0=ffab[]
2022-02-23 22:49:37,306 [MainThread] DEBUG: 87:0=ff9c[]
2022-02-23 22:49:37,306 [MainThread] DEBUG: 87:1=ffb1[]
2022-02-23 22:49:37,307 [MainThread] DEBUG: 88:0=ff99[]
2022-02-23 22:49:37,308 [MainThread] DEBUG: 88:1=ffb2[]
2022-02-23 22:49:37,308 [MainThread] DEBUG: 89:0=ff9b[]
2022-02-23 22:49:37,308 [MainThread] DEBUG: 89:1=ffb3[]
2022-02-23 22:49:37,308 [MainThread] DEBUG: 90:0=ff9e[]
2022-02-23 22:49:37,308 [MainThread] DEBUG: 90:1=ffb0[]
2022-02-23 22:49:37,309 [MainThread] DEBUG: 91:0=ff9f[]
2022-02-23 22:49:37,309 [MainThread] DEBUG: 92:0=fe03[]
2022-02-23 22:49:37,309 [MainThread] DEBUG: 94:0=3c[<]
2022-02-23 22:49:37,309 [MainThread] DEBUG: 94:81=a6[¦]
2022-02-23 22:49:37,310 [MainThread] DEBUG: 95:0=ffc8[]
2022-02-23 22:49:37,310 [MainThread] DEBUG: 96:0=ffc9[]
2022-02-23 22:49:37,310 [MainThread] DEBUG: 98:0=ff26[]
2022-02-23 22:49:37,310 [MainThread] DEBUG: 99:0=ff25[]
2022-02-23 22:49:37,311 [MainThread] DEBUG: 100:0=ff23[]
2022-02-23 22:49:37,311 [MainThread] DEBUG: 101:0=ff27[]
2022-02-23 22:49:37,311 [MainThread] DEBUG: 102:0=ff22[]
2022-02-23 22:49:37,311 [MainThread] DEBUG: 104:0=ff8d[]
2022-02-23 22:49:37,311 [MainThread] DEBUG: 105:0=ffe4[]
2022-02-23 22:49:37,312 [MainThread] DEBUG: 106:0=ffaf[]
2022-02-23 22:49:37,312 [MainThread] DEBUG: 107:0=ff61[]
2022-02-23 22:49:37,312 [MainThread] DEBUG: 107:1=ff15[]
2022-02-23 22:49:37,312 [MainThread] DEBUG: 108:0=ffea[]
2022-02-23 22:49:37,312 [MainThread] DEBUG: 108:1=ffe8[]
2022-02-23 22:49:37,313 [MainThread] DEBUG: 109:0=ff0a[]
2022-02-23 22:49:37,313 [MainThread] DEBUG: 110:0=ff50[]
2022-02-23 22:49:37,313 [MainThread] DEBUG: 111:0=ff52[]
2022-02-23 22:49:37,313 [MainThread] DEBUG: 112:0=ff55[]
2022-02-23 22:49:37,313 [MainThread] DEBUG: 113:0=ff51[]
2022-02-23 22:49:37,314 [MainThread] DEBUG: 114:0=ff53[]
2022-02-23 22:49:37,314 [MainThread] DEBUG: 115:0=ff57[]
2022-02-23 22:49:37,314 [MainThread] DEBUG: 116:0=ff54[]
2022-02-23 22:49:37,314 [MainThread] DEBUG: 117:0=ff56[]
2022-02-23 22:49:37,314 [MainThread] DEBUG: 118:0=ff63[]
2022-02-23 22:49:37,315 [MainThread] DEBUG: 119:0=ffff[]
2022-02-23 22:49:37,315 [MainThread] DEBUG: 121:0=1008ff12[]
2022-02-23 22:49:37,315 [MainThread] DEBUG: 122:0=1008ff11[]
2022-02-23 22:49:37,315 [MainThread] DEBUG: 123:0=1008ff13[]
2022-02-23 22:49:37,315 [MainThread] DEBUG: 124:0=1008ff2a[]
2022-02-23 22:49:37,316 [MainThread] DEBUG: 125:0=ffbd[]
2022-02-23 22:49:37,316 [MainThread] DEBUG: 126:0=b1[±]
2022-02-23 22:49:37,316 [MainThread] DEBUG: 127:0=ff13[]
2022-02-23 22:49:37,316 [MainThread] DEBUG: 127:1=ff6b[]
2022-02-23 22:49:37,316 [MainThread] DEBUG: 128:0=1008ff4a[]
2022-02-23 22:49:37,317 [MainThread] DEBUG: 129:0=ffae[]
2022-02-23 22:49:37,317 [MainThread] DEBUG: 130:0=ff31[]
2022-02-23 22:49:37,317 [MainThread] DEBUG: 131:0=ff34[]
2022-02-23 22:49:37,317 [MainThread] DEBUG: 133:0=ffeb[]
2022-02-23 22:49:37,317 [MainThread] DEBUG: 134:0=ffec[]
2022-02-23 22:49:37,318 [MainThread] DEBUG: 135:0=ff67[]
2022-02-23 22:49:37,318 [MainThread] DEBUG: 136:0=ff69[]
2022-02-23 22:49:37,318 [MainThread] DEBUG: 137:0=ff66[]
2022-02-23 22:49:37,318 [MainThread] DEBUG: 138:0=1005ff70[]
2022-02-23 22:49:37,318 [MainThread] DEBUG: 139:0=ff65[]
2022-02-23 22:49:37,319 [MainThread] DEBUG: 140:0=1005ff71[]
2022-02-23 22:49:37,319 [MainThread] DEBUG: 141:0=1008ff57[]
2022-02-23 22:49:37,319 [MainThread] DEBUG: 142:0=1008ff6b[]
2022-02-23 22:49:37,319 [MainThread] DEBUG: 143:0=1008ff6d[]
2022-02-23 22:49:37,319 [MainThread] DEBUG: 144:0=ff68[]
2022-02-23 22:49:37,320 [MainThread] DEBUG: 145:0=1008ff58[]
2022-02-23 22:49:37,320 [MainThread] DEBUG: 146:0=ff6a[]
2022-02-23 22:49:37,320 [MainThread] DEBUG: 147:0=1008ff65[]
2022-02-23 22:49:37,320 [MainThread] DEBUG: 148:0=1008ff1d[]
2022-02-23 22:49:37,320 [MainThread] DEBUG: 150:0=1008ff2f[]
2022-02-23 22:49:37,321 [MainThread] DEBUG: 151:0=1008ff2b[]
2022-02-23 22:49:37,321 [MainThread] DEBUG: 152:0=1008ff5d[]
2022-02-23 22:49:37,321 [MainThread] DEBUG: 153:0=1008ff7b[]
2022-02-23 22:49:37,321 [MainThread] DEBUG: 155:0=1008ff8a[]
2022-02-23 22:49:37,321 [MainThread] DEBUG: 156:0=1008ff41[]
2022-02-23 22:49:37,322 [MainThread] DEBUG: 157:0=1008ff42[]
2022-02-23 22:49:37,322 [MainThread] DEBUG: 158:0=1008ff2e[]
2022-02-23 22:49:37,322 [MainThread] DEBUG: 159:0=1008ff5a[]
2022-02-23 22:49:37,322 [MainThread] DEBUG: 160:0=1008ff2d[]
2022-02-23 22:49:37,322 [MainThread] DEBUG: 161:0=1008ff74[]
2022-02-23 22:49:37,323 [MainThread] DEBUG: 162:0=1008ff7f[]
2022-02-23 22:49:37,323 [MainThread] DEBUG: 163:0=1008ff19[]
2022-02-23 22:49:37,323 [MainThread] DEBUG: 164:0=1008ff30[]
2022-02-23 22:49:37,323 [MainThread] DEBUG: 165:0=1008ff33[]
2022-02-23 22:49:37,323 [MainThread] DEBUG: 166:0=1008ff26[]
2022-02-23 22:49:37,324 [MainThread] DEBUG: 167:0=1008ff27[]
2022-02-23 22:49:37,324 [MainThread] DEBUG: 169:0=1008ff2c[]
2022-02-23 22:49:37,324 [MainThread] DEBUG: 171:0=1008ff17[]
2022-02-23 22:49:37,324 [MainThread] DEBUG: 172:0=1008ff14[]
2022-02-23 22:49:37,324 [MainThread] DEBUG: 173:0=1008ff16[]
2022-02-23 22:49:37,325 [MainThread] DEBUG: 174:0=1008ff15[]
2022-02-23 22:49:37,325 [MainThread] DEBUG: 175:0=1008ff1c[]
2022-02-23 22:49:37,325 [MainThread] DEBUG: 176:0=1008ff3e[]
2022-02-23 22:49:37,325 [MainThread] DEBUG: 177:0=1008ff6e[]
2022-02-23 22:49:37,325 [MainThread] DEBUG: 179:0=1008ff81[]
2022-02-23 22:49:37,326 [MainThread] DEBUG: 180:0=1008ff18[]
2022-02-23 22:49:37,326 [MainThread] DEBUG: 181:0=1008ff73[]
2022-02-23 22:49:37,326 [MainThread] DEBUG: 182:0=1008ff56[]
2022-02-23 22:49:37,326 [MainThread] DEBUG: 185:0=1008ff78[]
2022-02-23 22:49:37,326 [MainThread] DEBUG: 186:0=1008ff79[]
2022-02-23 22:49:37,327 [MainThread] DEBUG: 187:0=28[(]
2022-02-23 22:49:37,327 [MainThread] DEBUG: 188:0=29[)]
2022-02-23 22:49:37,327 [MainThread] DEBUG: 189:0=1008ff68[]
2022-02-23 22:49:37,327 [MainThread] DEBUG: 192:0=1008ff45[]
2022-02-23 22:49:37,327 [MainThread] DEBUG: 193:0=1008ff46[]
2022-02-23 22:49:37,328 [MainThread] DEBUG: 194:0=1008ff47[]
2022-02-23 22:49:37,328 [MainThread] DEBUG: 195:0=1008ff48[]
2022-02-23 22:49:37,328 [MainThread] DEBUG: 196:0=1008ff49[]
2022-02-23 22:49:37,328 [MainThread] DEBUG: 198:0=1008ffb2[]
2022-02-23 22:49:37,328 [MainThread] DEBUG: 199:0=1008ffa9[]
2022-02-23 22:49:37,329 [MainThread] DEBUG: 200:0=1008ffb0[]
2022-02-23 22:49:37,329 [MainThread] DEBUG: 201:0=1008ffb1[]
2022-02-23 22:49:37,329 [MainThread] DEBUG: 203:0=ff7e[]
2022-02-23 22:49:37,329 [MainThread] DEBUG: 207:1=ffed[]
2022-02-23 22:49:37,329 [MainThread] DEBUG: 209:0=1008ff31[]
2022-02-23 22:49:37,330 [MainThread] DEBUG: 210:0=1008ff43[]
2022-02-23 22:49:37,330 [MainThread] DEBUG: 211:0=1008ff44[]
2022-02-23 22:49:37,330 [MainThread] DEBUG: 212:0=1008ff4b[]
2022-02-23 22:49:37,330 [MainThread] DEBUG: 213:0=1008ffa7[]
2022-02-23 22:49:37,330 [MainThread] DEBUG: 216:0=1008ff97[]
2022-02-23 22:49:37,331 [MainThread] DEBUG: 220:0=1008ff8f[]
2022-02-23 22:49:37,331 [MainThread] DEBUG: 221:0=1008ffb6[]
2022-02-23 22:49:37,331 [MainThread] DEBUG: 224:0=1008ff8e[]
2022-02-23 22:49:37,331 [MainThread] DEBUG: 225:0=1008ff1b[]
2022-02-23 22:49:37,331 [MainThread] DEBUG: 226:0=1008ff5f[]
2022-02-23 22:49:37,332 [MainThread] DEBUG: 227:0=1008ff3c[]
2022-02-23 22:49:37,332 [MainThread] DEBUG: 228:0=1008ff5e[]
2022-02-23 22:49:37,332 [MainThread] DEBUG: 229:0=1008ff36[]
2022-02-23 22:49:37,332 [MainThread] DEBUG: 232:0=1008ff03[]
2022-02-23 22:49:37,332 [MainThread] DEBUG: 233:0=1008ff02[]
2022-02-23 22:49:37,333 [MainThread] DEBUG: 234:0=1008ff32[]
2022-02-23 22:49:37,333 [MainThread] DEBUG: 235:0=1008ff59[]
2022-02-23 22:49:37,333 [MainThread] DEBUG: 236:0=1008ff04[]
2022-02-23 22:49:37,333 [MainThread] DEBUG: 237:0=1008ff06[]
2022-02-23 22:49:37,334 [MainThread] DEBUG: 238:0=1008ff05[]
2022-02-23 22:49:37,334 [MainThread] DEBUG: 240:0=1008ff72[]
2022-02-23 22:49:37,334 [MainThread] DEBUG: 241:0=1008ff90[]
2022-02-23 22:49:37,334 [MainThread] DEBUG: 242:0=1008ff77[]
2022-02-23 22:49:37,334 [MainThread] DEBUG: 243:0=1008ff5b[]
2022-02-23 22:49:37,335 [MainThread] DEBUG: 244:0=1008ff93[]
2022-02-23 22:49:37,335 [MainThread] DEBUG: 245:0=1008ff94[]
2022-02-23 22:49:37,335 [MainThread] DEBUG: 246:0=1008ff95[]
2022-02-23 22:49:37,335 [MainThread] DEBUG: 247:0=1008ff96[]
2022-02-23 22:49:37,336 [MainThread] DEBUG: 249:0=1008fe22[]
2022-02-23 22:49:37,336 [MainThread] DEBUG: 250:0=1008fe23[]
2022-02-23 22:49:37,336 [MainThread] DEBUG: 251:0=1008ff07[]
2022-02-23 22:49:37,336 [MainThread] DEBUG: 252:0=100810f4[]
2022-02-23 22:49:37,337 [MainThread] DEBUG: 253:0=100810f5[]
2022-02-23 22:49:37,337 [MainThread] DEBUG: 254:0=1008ffb4[]
2022-02-23 22:49:37,337 [MainThread] DEBUG: 255:0=1008ffb5[]
2022-02-23 22:49:37,337 [MainThread] INFO: 38 custom mappings(s)
2022-02-23 22:49:37,411 [Dummy-1] INFO: set_stroke_filename(/tmp/plover-checkout/strokes.log)
2022-02-23 22:49:37,412 [Dummy-1] INFO: enable_stroke_logging(False)
2022-02-23 22:49:37,412 [Dummy-1] INFO: enable_translation_logging(False)
2022-02-23 22:49:37,412 [Dummy-1] INFO: loading system: English Stenotype
2022-02-23 22:49:38,350 [Dummy-1] INFO: setting machine: TX Bolt
2022-02-23 22:49:38,351 [Dummy-1] WARNING: Serial port is not open: None
2022-02-23 22:49:38,351 [Dummy-1] INFO: loading dictionary: /tmp/plover-checkout/user.json
2022-02-23 22:49:38,358 [Dummy-1] INFO: loading dictionary: /tmp/plover-checkout/commands.json
2022-02-23 22:49:38,361 [Dummy-1] INFO: loading dictionary: /tmp/plover-checkout/main.json
2022-02-23 22:49:40,488 [Dummy-1] INFO: loaded 3 dictionaries in 2.137s
benoit-pierre commented 2 years ago

I think you're might be hitting #1036. That v4.0.0.dev8 version is old, please download the latest continuous release AppImage and test again (make sure to re-configure the machine).

Additionally, the python-wxpython dependency in that Guix package is wrong and should be removed (Plover has not been dependent on wxWidget since the switch to Qt with v4.0.0).

arunisaac commented 2 years ago

I tried with the latest plover source from the git repo, and started with a clean config using touch plover.cfg. But, I still get the same Serial port is not open: None error. In the Configure window, /dev/ttyACM0 is found correctly, but I get DBus errors and the correct serial port setting does not reach the main window. The logs from the command line follow.

running launch
running build_py
running build_ui
running egg_info
writing plover.egg-info/PKG-INFO
writing dependency_links to plover.egg-info/dependency_links.txt
writing entry points to plover.egg-info/entry_points.txt
writing requirements to plover.egg-info/requires.txt
writing top-level names to plover.egg-info/top_level.txt
reading manifest file 'plover.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files found matching '.gitignore'
warning: no previously-included files found matching 'plover/gui_qt/.gitignore'
no previously-included directories found matching '.github'
adding license file 'LICENSE.txt'
writing manifest file 'plover.egg-info/SOURCES.txt'
generating ui (hooks: fix_icons, no_autoconnection, gettext)
generating plover/gui_qt/resources_rc.py
running compile_catalog
compiling catalog plover/messages/nl/LC_MESSAGES/plover.po to plover/messages/nl/LC_MESSAGES/plover.mo
compiling catalog plover/messages/it/LC_MESSAGES/plover.po to plover/messages/it/LC_MESSAGES/plover.mo
compiling catalog plover/messages/fr/LC_MESSAGES/plover.po to plover/messages/fr/LC_MESSAGES/plover.mo
compiling catalog plover/messages/es/LC_MESSAGES/plover.po to plover/messages/es/LC_MESSAGES/plover.mo
copying plover/gui_qt/resources_rc.py -> build/lib/plover/gui_qt
copying plover/messages/nl/LC_MESSAGES/plover.mo -> build/lib/plover/messages/nl/LC_MESSAGES
copying plover/messages/it/LC_MESSAGES/plover.mo -> build/lib/plover/messages/it/LC_MESSAGES
copying plover/messages/fr/LC_MESSAGES/plover.mo -> build/lib/plover/messages/fr/LC_MESSAGES
copying plover/messages/es/LC_MESSAGES/plover.mo -> build/lib/plover/messages/es/LC_MESSAGES
running build_ext
2022-02-25 11:29:05,141 [Dummy-1] WARNING: Serial port is not open: None
ERROR:dbus.proxies:Introspect error on :1.1:/org/freedesktop/Notifications: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
2022-02-25 11:29:55,180 [Dummy-1] ERROR: engine update failed
Traceback (most recent call last):
  File "/tmp/plover/plover/engine.py", line 147, in run
    if func(*args, **kwargs):
  File "/tmp/plover/plover/engine.py", line 251, in _update
    self._machine.start_capture()
  File "/tmp/plover/plover/machine/base.py", line 222, in start_capture
    log.warning('Serial port is not open: %s', self.serial_params.get('port'))
  File "/gnu/store/9xfmjkx82xamyb25ac3k87ihcj575nzk-python-3.9.9/lib/python3.9/logging/__init__.py", line 1458, in warning
    self._log(WARNING, msg, args, **kwargs)
  File "/gnu/store/9xfmjkx82xamyb25ac3k87ihcj575nzk-python-3.9.9/lib/python3.9/logging/__init__.py", line 1589, in _log
    self.handle(record)
  File "/gnu/store/9xfmjkx82xamyb25ac3k87ihcj575nzk-python-3.9.9/lib/python3.9/logging/__init__.py", line 1599, in handle
    self.callHandlers(record)
  File "/gnu/store/9xfmjkx82xamyb25ac3k87ihcj575nzk-python-3.9.9/lib/python3.9/logging/__init__.py", line 1661, in callHandlers
    hdlr.handle(record)
  File "/gnu/store/9xfmjkx82xamyb25ac3k87ihcj575nzk-python-3.9.9/lib/python3.9/logging/__init__.py", line 952, in handle
    self.emit(record)
  File "/tmp/plover/plover/oslayer/log_dbus.py", line 42, in emit
    self._notify.Notify(APPNAME, 0, APPICON,  # app_name, replaces_id, app_icon
  File "/gnu/store/01bw2krl6nhhaj44rb7mw4jp9rjgqa8q-profile/lib/python3.9/site-packages/dbus/proxies.py", line 72, in __call__
    return self._proxy_method(*args, **keywords)
  File "/gnu/store/01bw2krl6nhhaj44rb7mw4jp9rjgqa8q-profile/lib/python3.9/site-packages/dbus/proxies.py", line 141, in __call__
    return self._connection.call_blocking(self._named_service,
  File "/gnu/store/01bw2krl6nhhaj44rb7mw4jp9rjgqa8q-profile/lib/python3.9/site-packages/dbus/connection.py", line 652, in call_blocking
    reply_message = self.send_message_with_reply_and_block(
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
2022-02-25 11:30:20,232 [Dummy-1] ERROR: Qt GUI error
Traceback (most recent call last):
  File "/tmp/plover/plover/engine.py", line 147, in run
    if func(*args, **kwargs):
  File "/tmp/plover/plover/engine.py", line 251, in _update
    self._machine.start_capture()
  File "/tmp/plover/plover/machine/base.py", line 222, in start_capture
    log.warning('Serial port is not open: %s', self.serial_params.get('port'))
  File "/gnu/store/9xfmjkx82xamyb25ac3k87ihcj575nzk-python-3.9.9/lib/python3.9/logging/__init__.py", line 1458, in warning
    self._log(WARNING, msg, args, **kwargs)
  File "/gnu/store/9xfmjkx82xamyb25ac3k87ihcj575nzk-python-3.9.9/lib/python3.9/logging/__init__.py", line 1589, in _log
    self.handle(record)
  File "/gnu/store/9xfmjkx82xamyb25ac3k87ihcj575nzk-python-3.9.9/lib/python3.9/logging/__init__.py", line 1599, in handle
    self.callHandlers(record)
  File "/gnu/store/9xfmjkx82xamyb25ac3k87ihcj575nzk-python-3.9.9/lib/python3.9/logging/__init__.py", line 1661, in callHandlers
    hdlr.handle(record)
  File "/gnu/store/9xfmjkx82xamyb25ac3k87ihcj575nzk-python-3.9.9/lib/python3.9/logging/__init__.py", line 952, in handle
    self.emit(record)
  File "/tmp/plover/plover/oslayer/log_dbus.py", line 42, in emit
    self._notify.Notify(APPNAME, 0, APPICON,  # app_name, replaces_id, app_icon
  File "/gnu/store/01bw2krl6nhhaj44rb7mw4jp9rjgqa8q-profile/lib/python3.9/site-packages/dbus/proxies.py", line 72, in __call__
    return self._proxy_method(*args, **keywords)
  File "/gnu/store/01bw2krl6nhhaj44rb7mw4jp9rjgqa8q-profile/lib/python3.9/site-packages/dbus/proxies.py", line 141, in __call__
    return self._connection.call_blocking(self._named_service,
  File "/gnu/store/01bw2krl6nhhaj44rb7mw4jp9rjgqa8q-profile/lib/python3.9/site-packages/dbus/connection.py", line 652, in call_blocking
    reply_message = self.send_message_with_reply_and_block(
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/tmp/plover/plover/gui_qt/engine.py", line 54, in run
    super().run()
  File "/tmp/plover/plover/engine.py", line 150, in run
    log.error('engine %s failed', func.__name__[1:], exc_info=True)
  File "/gnu/store/9xfmjkx82xamyb25ac3k87ihcj575nzk-python-3.9.9/lib/python3.9/logging/__init__.py", line 1475, in error
    self._log(ERROR, msg, args, **kwargs)
  File "/gnu/store/9xfmjkx82xamyb25ac3k87ihcj575nzk-python-3.9.9/lib/python3.9/logging/__init__.py", line 1589, in _log
    self.handle(record)
  File "/gnu/store/9xfmjkx82xamyb25ac3k87ihcj575nzk-python-3.9.9/lib/python3.9/logging/__init__.py", line 1599, in handle
    self.callHandlers(record)
  File "/gnu/store/9xfmjkx82xamyb25ac3k87ihcj575nzk-python-3.9.9/lib/python3.9/logging/__init__.py", line 1661, in callHandlers
    hdlr.handle(record)
  File "/gnu/store/9xfmjkx82xamyb25ac3k87ihcj575nzk-python-3.9.9/lib/python3.9/logging/__init__.py", line 952, in handle
    self.emit(record)
  File "/tmp/plover/plover/oslayer/log_dbus.py", line 42, in emit
    self._notify.Notify(APPNAME, 0, APPICON,  # app_name, replaces_id, app_icon
  File "/gnu/store/01bw2krl6nhhaj44rb7mw4jp9rjgqa8q-profile/lib/python3.9/site-packages/dbus/proxies.py", line 141, in __call__
    return self._connection.call_blocking(self._named_service,
  File "/gnu/store/01bw2krl6nhhaj44rb7mw4jp9rjgqa8q-profile/lib/python3.9/site-packages/dbus/connection.py", line 652, in call_blocking
    reply_message = self.send_message_with_reply_and_block(
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Error in sys.excepthook:
Traceback (most recent call last):
  File "/gnu/store/9xfmjkx82xamyb25ac3k87ihcj575nzk-python-3.9.9/lib/python3.9/logging/__init__.py", line 952, in handle
    self.emit(record)
  File "/tmp/plover/plover/oslayer/log_dbus.py", line 42, in emit
    self._notify.Notify(APPNAME, 0, APPICON,  # app_name, replaces_id, app_icon
  File "/gnu/store/01bw2krl6nhhaj44rb7mw4jp9rjgqa8q-profile/lib/python3.9/site-packages/dbus/proxies.py", line 141, in __call__
    return self._connection.call_blocking(self._named_service,
  File "/gnu/store/01bw2krl6nhhaj44rb7mw4jp9rjgqa8q-profile/lib/python3.9/site-packages/dbus/connection.py", line 652, in call_blocking
    reply_message = self.send_message_with_reply_and_block(
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

Original exception was:
Traceback (most recent call last):
  File "/tmp/plover/plover/engine.py", line 147, in run
    if func(*args, **kwargs):
  File "/tmp/plover/plover/engine.py", line 251, in _update
    self._machine.start_capture()
  File "/tmp/plover/plover/machine/base.py", line 222, in start_capture
    log.warning('Serial port is not open: %s', self.serial_params.get('port'))
  File "/gnu/store/9xfmjkx82xamyb25ac3k87ihcj575nzk-python-3.9.9/lib/python3.9/logging/__init__.py", line 1458, in warning
    self._log(WARNING, msg, args, **kwargs)
  File "/gnu/store/9xfmjkx82xamyb25ac3k87ihcj575nzk-python-3.9.9/lib/python3.9/logging/__init__.py", line 1589, in _log
    self.handle(record)
  File "/gnu/store/9xfmjkx82xamyb25ac3k87ihcj575nzk-python-3.9.9/lib/python3.9/logging/__init__.py", line 1599, in handle
    self.callHandlers(record)
  File "/gnu/store/9xfmjkx82xamyb25ac3k87ihcj575nzk-python-3.9.9/lib/python3.9/logging/__init__.py", line 1661, in callHandlers
    hdlr.handle(record)
  File "/gnu/store/9xfmjkx82xamyb25ac3k87ihcj575nzk-python-3.9.9/lib/python3.9/logging/__init__.py", line 952, in handle
    self.emit(record)
  File "/tmp/plover/plover/oslayer/log_dbus.py", line 42, in emit
    self._notify.Notify(APPNAME, 0, APPICON,  # app_name, replaces_id, app_icon
  File "/gnu/store/01bw2krl6nhhaj44rb7mw4jp9rjgqa8q-profile/lib/python3.9/site-packages/dbus/proxies.py", line 72, in __call__
    return self._proxy_method(*args, **keywords)
  File "/gnu/store/01bw2krl6nhhaj44rb7mw4jp9rjgqa8q-profile/lib/python3.9/site-packages/dbus/proxies.py", line 141, in __call__
    return self._connection.call_blocking(self._named_service,
  File "/gnu/store/01bw2krl6nhhaj44rb7mw4jp9rjgqa8q-profile/lib/python3.9/site-packages/dbus/connection.py", line 652, in call_blocking
    reply_message = self.send_message_with_reply_and_block(
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/tmp/plover/plover/gui_qt/engine.py", line 54, in run
    super().run()
  File "/tmp/plover/plover/engine.py", line 150, in run
    log.error('engine %s failed', func.__name__[1:], exc_info=True)
  File "/gnu/store/9xfmjkx82xamyb25ac3k87ihcj575nzk-python-3.9.9/lib/python3.9/logging/__init__.py", line 1475, in error
    self._log(ERROR, msg, args, **kwargs)
  File "/gnu/store/9xfmjkx82xamyb25ac3k87ihcj575nzk-python-3.9.9/lib/python3.9/logging/__init__.py", line 1589, in _log
    self.handle(record)
  File "/gnu/store/9xfmjkx82xamyb25ac3k87ihcj575nzk-python-3.9.9/lib/python3.9/logging/__init__.py", line 1599, in handle
    self.callHandlers(record)
  File "/gnu/store/9xfmjkx82xamyb25ac3k87ihcj575nzk-python-3.9.9/lib/python3.9/logging/__init__.py", line 1661, in callHandlers
    hdlr.handle(record)
  File "/gnu/store/9xfmjkx82xamyb25ac3k87ihcj575nzk-python-3.9.9/lib/python3.9/logging/__init__.py", line 952, in handle
    self.emit(record)
  File "/tmp/plover/plover/oslayer/log_dbus.py", line 42, in emit
    self._notify.Notify(APPNAME, 0, APPICON,  # app_name, replaces_id, app_icon
  File "/gnu/store/01bw2krl6nhhaj44rb7mw4jp9rjgqa8q-profile/lib/python3.9/site-packages/dbus/proxies.py", line 141, in __call__
    return self._connection.call_blocking(self._named_service,
  File "/gnu/store/01bw2krl6nhhaj44rb7mw4jp9rjgqa8q-profile/lib/python3.9/site-packages/dbus/connection.py", line 652, in call_blocking
    reply_message = self.send_message_with_reply_and_block(
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

However, I tried after commenting out the dbus lines in plover/oslayer/log_dbus.py. This time, I still got the Serial port is not open: None error, but no DBus errors when I went to the Configure window. So, I was able to apply changes in the Configure window, and the correct serial port setting reached the main window, and everything worked normally. Perhaps there is some DBus issue on my end. I will debug a bit more.

In summary, the Serial port is not open: None error is likely a plover bug, but the DBus errors could be on my end.

And, FWIW, I also updated and removed the obsolete dependencies from the Guix plover package. https://git.savannah.gnu.org/cgit/guix.git/commit/?id=979b6a2c55fab729923d76ac9fee027d5d2d8f2b

benoit-pierre commented 2 years ago

Well, if the logging handler does not work, and raises an exception every time it's called, this can create a number of issues... The code is supposed to fallback on using Qt for notifications if the DBus handler cannot be setup, but in your case, it's setup, but non-functional for some reason... Can you try the following patch:

diff --git i/plover/oslayer/log_dbus.py w/plover/oslayer/log_dbus.py
index 5e4c789a..d899cb29 100644
--- i/plover/oslayer/log_dbus.py
+++ w/plover/oslayer/log_dbus.py
@@ -24,6 +24,8 @@ def __init__(self):
         self._notify = dbus.Interface(self._proxy, SERVICE)
         self.setLevel(log.WARNING)
         self.setFormatter(log.NoExceptionTracebackFormatter('<b>%(levelname)s:</b> %(message)s'))
+        # Check the notification service is functional by getting capabilities.
+        self._notify.GetCapabilities()

     def emit(self, record):
         level = record.levelno

Start from a clean configuration again, switch to another machine (without configuring the port), and check you get an error notification.

arunisaac commented 2 years ago

It turns out ednc, my desktop notifications system did not support type introspection. plover (through python-dbus) depends on type introspection, and this was the source of all the DBus errors. I reported the problem to ednc, and the author was kind enough to immediately implement introspection. Now, the DBus errors are sorted out, and I'm able to set the serial port using the Configure window. Plover no longer freezes or crashes. My steno machine works as expected.

However, when I start Plover with a clean config, I still get the Serial port is not open: None warning. I think plover only scans for serial ports when I go to the Configure window. Maybe, it should do it transparently even in the main window.

benoit-pierre commented 2 years ago

Were you able to check if the fallback to Qt for notifications work?

However, when I start Plover with a clean config, I still get the Serial port is not open: None warning. I think plover only scans for serial ports when I go to the Configure window. Maybe, it should do it transparently even in the main window

No: there's no way to know if a serial port is indeed connected to serial machine, and the impact of writing to a serial port if it's not one. So it's better to only do so after explicit configuration by the user.

arunisaac commented 2 years ago

Were you able to check if the fallback to Qt for notification work?

I just tried with ednc disabled, and I get notifications in a Qt dialog box. In other words, it falls back to Qt as expected.

No: there's no way to know if a serial port is indeed connected to serial machine, and the impact of writing to a serial port if it's not one. So it's better to only do so after explicit configuration by the user.

Ok, that make sense. We can close this issue.

Thanks!

user202729 commented 2 years ago

Alright it was indeed notification bug.

It remains possible to replace "serial port is not found: None" message with "you haven't configured a serial port", but I don't think it matters much.

arunisaac commented 2 years ago

It remains possible to replace "serial port is not found: None" message with "you haven't configured a serial port", but I don't think it matters much.

I agree.

Maybe, in the main window, "TX Bolt" should not be listed in the machines drop down menu until it is configured. But, then again, I'm not sure if that would make a big difference.

benoit-pierre commented 2 years ago

Were you able to check if the fallback to Qt for notification work? I just tried with ednc disabled, and I get notifications in a Qt dialog box. In other words, it falls back to Qt as expected.

Actually what I really wanted to test is if with the old ednc (no type introspection) and the patch above, we would correctly fallback to Qt.

But never mind, I've installed Emacs locally, and an old version of ednc, and could reproduce.

1496 does work with a version of ednc with no type introspection.

arunisaac commented 2 years ago

Hi,

Why was this reopened?

Cheers!

arunisaac commented 2 years ago

Never mind, I failed to see the linked issue (#1496) earlier.

leira commented 1 year ago

I hit this same issue with v4.0.0.dev12. I'm on NixOS. Plover is installed with this nix https://github.com/leira/nix-config/blob/main/pkgs/plover/default.nix.

Plover correctly found the serial port: plover-serial

The serial port belongs to dialout group.

 ls -lg /dev/serial/by-id/usb-beekeeb_piantor-if02 /dev/ttyACM0
crw-rw---- 166,0 root dialout  8 Jan 18:58  /dev/ttyACM0
lrwxrwxrwx    13 root root     8 Jan 18:58  /dev/serial/by-id/usb-beekeeb_piantor-if02 -> ../../ttyACM0

I'm a member of dialout.

 groups
users wheel dialout networkmanager

When trying to connect to Gemini PR, it shows this pop up: plover-serial-pop

Not much logs are printed:

2023-01-09 00:12:25,934 [Dummy-1] INFO: setting machine: Gemini PR
2023-01-09 00:12:25,935 [Dummy-1] WARNING: Serial port is not open: None
leira commented 1 year ago

Mystery solved.

After I opened the configuration, and switched to GeminiPR, I checked the Port value was correct. Then I dismissed the dialog with Esc.

I was expecting it to work because it showed me the correct configuration, and I considerably canceled the dialog to not disturb the configuration. But it didn't save the configuration into plover.cfg. There is still no GeminiPR section in the plover.cfg file. So the serial port was literally None, just as the dialog shows.

After I hit Apply or OK in the configuration dialog, it worked.

I'm not sure if it is a bug per se. I suppose I didn't understand the warning correctly. Or I got mixed signal from the warning and the configuration dialog. Maybe some documentation, or better wording of the warning. Or do the serial port detection outside of the dialog, and use the default port?