Project

General

Profile

Actions

Bug #10275

closed

FT-4X driver: TypeError: argument should be integer or bytes-like object, not 'str'

Added by Beni K almost 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
01/15/2023
Due date:
% Done:

100%

Estimated time:
Chirp Version:
next (py3)
Model affected:
FT-4X
Platform:
Linux
Debug Log:
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 #1

Updated by Dan Smith almost 2 years ago

  • Target version set to chirp-py3

Thanks, can you submit this against the repo?

https://github.com/kk7ds/chirp

If not, I can do it for you.

Actions #2

Updated by Beni K almost 2 years ago

Hmm, I couldn't find the repo on Github, guess I didn't look close enough.

I'm not sure whether you meant me to report an issue or a PR on said repo. I did latter: https://github.com/kk7ds/chirp/pull/398 - hope that's what you had in mind.

Actions #3

Updated by Dan Smith almost 2 years ago

Yep, perfect, thanks!

Actions #4

Updated by Anonymous almost 2 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF