Jan-27-2024, 02:06 PM
(Jan-26-2024, 06:10 PM)deanhystad Wrote: Can you post the code? What evidence do you have leading you to think it does not work? How do you run the code normally?
On windows, a .pyw file is usually run by double clicking on the file. The "w" in the extension tells python to not open a shell window. Remove the "w" and your program will open two windows (cmd or powershell and the tkinter window). As you discovered, you can also run the program by passing the program file name as an argument when starting python (python myprogram.py).
I remove Python 2 from my computer and reinstalled Python 3.12.1. The converted program will now run from command line and from double-click, but will not talk to the radio.
To shorten this story a bit, after you started asking about why I was typing into the interpreter, I looked around a bit more and found the IDLE. That brought up a shell. Using the shell to open the file, rather than copy and paste from Notepad, the program will run, just still will not talk to the radio. The shell does not report any errors until I click the "Test" button to verify connectivity with the radio. When the "Test" button is clicked, the shell reports an error:
Error:Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Program Files\Python312\Lib\tkinter\__init__.py", line 1962, in __call__
return self.func(*args)
^^^^^^^^^^^^^^^^
File "E:\HamStuff\Odyssey\BL2.1\BootLoader_2_1.pyw", line 133, in test_button_clicked
MESSAGE = bytearray(b'MAC' + chr(0)*29) # Preparing the message
~~~~~~~^~~~~~~~~~~
TypeError: can't concat str to bytes
This will not mean much without the code.I have attempted to attach the file. If that did not work, I can post it in a reply or as an e-mail.