kcjengr / qtpyvcp

QtPyVCP - Qt and Python based Virtual Control Panel framework for LinuxCNC.
https://www.qtpyvcp.com
Other
91 stars 51 forks source link

TypeError: a bytes-like object is required, not 'str' #144

Open copysent opened 4 months ago

copysent commented 4 months ago

The error message I see:

[qtpyvcp.app.launcher][DEBUG] Initializing widgets (launcher.py:81) Exception in thread Thread-1 (hal_poll_thread): Traceback (most recent call last): File "/usr/lib/python3.11/threading.py", line 1038, in _bootstrap_inner self.run() File "/usr/lib/python3.11/threading.py", line 975, in run self._target(*self._args, **self._kwargs) File "/usr/lib/python3/dist-packages/qtpyvcp/utilities/obj_status.py", line 336, in hal_poll_thread raw = rawtuple[0].split('\n') ^^^^^^^^^^^^^^^^^^^^^^^ TypeError: a bytes-like object is required, not 'str'

The location of the code in the tree:

https://github.com/kcjengr/qtpyvcp/blob/c20d4286cab764eb088c9e5e7fd34d94469cf3a5/src/qtpyvcp/utilities/obj_status.py#L336

Example code for testing:

from qtpyvcp.utilities.obj_status import HALStatus
hal_status = HALStatus()

def test_def(value):
    pass

pin = hal_status.getHalPin('some.existing.pin')

pin.connect(test_def)