Actions
Bug #10275
closedFT-4X driver: TypeError: argument should be integer or bytes-like object, not 'str'
Start date:
01/15/2023
Due date:
% Done:
100%
Estimated time:
Chirp Version:
next (py3)
Model affected:
FT-4X
Platform:
Linux
I read the instructions above:
Description
The FT-4X driver hat two instances of strings that should be bytes in Python 3. The following diff should fix this trivial problem. However the connection problem mentioned in issue 10198 still remains in CHIRP-next.
--- ./ft4.py.old 2023-01-09 11:00:26.000000000 +0100
+++ ./ft4.py 2023-01-15 06:57:45.549473236 +0100
@@ -309,8 +309,8 @@
enter_clonemode(radio)
id_response = sendcmd(radio.pipe, b'\x02', None)
if id_response != radio.id_str:
- substr0 = radio.id_str[:radio.id_str.find('\x00')]
- if id_response[:id_response.find('\x00')] != substr0:
+ substr0 = radio.id_str[:radio.id_str.find(b'\x00')]
+ if id_response[:id_response.find(b'\x00')] != substr0:
msg = "ID mismatch. Expected" + util.hexprint(radio.id_str)
msg += ", Received:" + util.hexprint(id_response)
LOG.warning(msg)
Actions