Stevo wrote: Sat Nov 26, 2022 7:58 pm
The python3 version is the only one that Debian is using. You could look at its bug reports there to see if there are any.
How do you know the version you have now isn't the python3 version? From what I can see on repology, most if not all distros are using that one.
I assume you are addressing me ?
(I finally found my programming cable and got around to this.)
I also do not know what repology is ?
(I think I found it and I wouldn't use that as evidence of 'most if not all' uses python3.
Only nine distros on that list do and only in the most recent distro release alot of them being 2021.
https://repology.org/project/chirp/versions)
The original project site at danplanet (
https://chirp.danplanet.com/projects/ch ... i/Download) still uses python2 in their scripts (the tarball package).
The python3 variant is found in various different distros that update the package to python3 syntax.
Now that modern distros have switched to python3 the original scripts from danplanet don't work.
Normally I use the repo packages but I download newer versions from danplanet.
Anyway I never came across the github site before and was not aware of it until you posted an excerpt from the changelog.
In MX19, I guess I had both python2 and python3 installed.
I guess the 'in situ' update to MX21 removed python2 and I didn't really pay much attention until I started playing with chirp again.
Note that I do not use python myself and chirp is the only python based program I have that I am aware of; so this never really has
been an issue for me since any other python program installed by synaptic because of dependencies just works because I am not
using them myself. Chirp is the only program I use manually cause repo versions are behind and I only need it to program the radio.
I haven't used in a while because I haven't needed to reprogram my radio.
I have tried using the chirp package you uploaded and have some issues.
(I am using the original repo package from your archive because I am not replacing the installed version just yet)
First, I can't run chirpw script; it has too many errors it can't recover from. (It still seems to be python2 based)
Second, I can run chirpwx.py instead. But it fails to communicate with the radio (Baofeng UV-5R).
When I run chirpw
Code: Select all
$> python3 ./chirpw
Failed to import /media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/ft1d: invalid syntax (ft1d.py, line 1893)
Failed to import /media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/ap510: invalid syntax (ap510.py, line 383)
Failed to import /media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/ftm3200d: invalid syntax (ft1d.py, line 1893)
Failed to import /media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/wouxun: invalid syntax (wouxun.py, line 277)
Failed to import /media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/bj9900: invalid syntax (bj9900.py, line 181)
Failed to import /media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/puxing_px888k: can only concatenate list (not "range") to list
Failed to import /media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/lt725uv: invalid syntax (lt725uv.py, line 1550)
Failed to import /media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/th_uv3r: invalid syntax (wouxun.py, line 277)
Failed to import /media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/ft450d: invalid syntax (ft450d.py, line 503)
Failed to import /media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/ftm7250d: invalid syntax (ft1d.py, line 1893)
Failed to import /media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/rfinder: invalid syntax (rfinder.py, line 239)
Failed to import /media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/ft2d: invalid syntax (ft1d.py, line 1893)
Failed to import /media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/puxing: invalid syntax (puxing.py, line 50)
Failed to import /media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/th_uv3r25: invalid syntax (wouxun.py, line 277)
Traceback (most recent call last):
File "/media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/./chirpw", line 142, in <module>
from chirp.ui import mainapp
File "/media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/ui/mainapp.py", line 1437
except errors.RadioError, e::
^
SyntaxError: invalid syntax
This is when I run chirpwx.py
And I attempt to download from the Baofeng UV-5R via /dev/ttyUSB1
Code: Select all
python3 ./chirpwx.py
Failed to import /media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/ft1d: invalid syntax (ft1d.py, line 1893)
Failed to import /media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/ap510: invalid syntax (ap510.py, line 383)
Failed to import /media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/ftm3200d: invalid syntax (ft1d.py, line 1893)
Failed to import /media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/wouxun: invalid syntax (wouxun.py, line 277)
Failed to import /media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/bj9900: invalid syntax (bj9900.py, line 181)
Failed to import /media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/puxing_px888k: can only concatenate list (not "range") to list
Failed to import /media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/lt725uv: invalid syntax (lt725uv.py, line 1550)
Failed to import /media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/th_uv3r: invalid syntax (wouxun.py, line 277)
Failed to import /media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/ft450d: invalid syntax (ft450d.py, line 503)
Failed to import /media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/ftm7250d: invalid syntax (ft1d.py, line 1893)
Failed to import /media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/rfinder: invalid syntax (rfinder.py, line 239)
Failed to import /media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/ft2d: invalid syntax (ft1d.py, line 1893)
Failed to import /media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/puxing: invalid syntax (puxing.py, line 50)
Failed to import /media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/th_uv3r25: invalid syntax (wouxun.py, line 277)
ERROR: uv5r._ident_radio: Radio did not respond
ERROR: uv5r._ident_radio: Radio did not respond
ERROR: Failed to clone: Radio did not respond
Traceback (most recent call last):
File "/media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/wxui/clone.py", line 33, in run
self._fn()
File "/media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/uv5r.py", line 855, in sync_in
self._mmap = _do_download(self)
File "/media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/uv5r.py", line 555, in _do_download
data = _ident_radio(radio)
File "/media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/uv5r.py", line 550, in _ident_radio
raise error
File "/media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/uv5r.py", line 527, in _ident_radio
data = _do_ident(radio, magic)
File "/media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/uv5r.py", line 422, in _do_ident
raise errors.RadioError("Radio did not respond")
chirp.errors.RadioError: Radio did not respond
During a subsequent test (and all following tests) I got this error:
Code: Select all
ERROR: Failed to clone: Failed to communicate with radio: a bytes-like object is required, not 'str'
Traceback (most recent call last):
File "/media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/uv5r.py", line 855, in sync_in
self._mmap = _do_download(self)
File "/media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/uv5r.py", line 575, in _do_download
elif "\x20" * 14 in radio_version:
TypeError: a bytes-like object is required, not 'str'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/wxui/clone.py", line 33, in run
self._fn()
File "/media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/uv5r.py", line 859, in sync_in
raise errors.RadioError("Failed to communicate with radio: %s" % e)
chirp.errors.RadioError: Failed to communicate with radio: a bytes-like object is required, not 'str'
After this error my radio has been left in a weird state.
The CTCSS is on and the radio is transmitting (mine is set for an amber display when transmitting, the screen
is orange after this error).
python three in use is:
Code: Select all
python3 -VV
Python 3.9.2 (default, Feb 28 2021, 17:03:44)
[GCC 10.2.1 20210110]
Requirements according to requirements.txt are installed:
six (I have ... python3-six 1.16.0-2)
wxPython (python3-wxgtk4.0 4.0.7dfsg-10)
pyserial (python3-serial 3.5~b0-1)
future (python3-future 0.18.2-5)
requests (python3-requests 2.25.1)