Update Chirp

Message
Author
User avatar
Stevo
Developer
Posts: 14415
Joined: Fri Dec 15, 2006 7:07 pm

Re: Update Chirp

#11 Post by Stevo »

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.

User avatar
TasogareNoOkami
Posts: 179
Joined: Sat Oct 24, 2020 2:32 pm

Re: Update Chirp

#12 Post by TasogareNoOkami »

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)
--
Where's there's smoke, There are mirrors.
Give me Free as in Freedom not Speech or Beer.
Internet and PC Industry/Gaming RIP 2011

kd4e
Posts: 260
Joined: Mon Dec 06, 2021 5:26 pm

Re: Update Chirp

#13 Post by kd4e »

Any updates re. the completely new version of CHIRP called chirp-next, please?

https://trac.chirp.danplanet.com/chirp_ ... -20230719/

https://chirp.danplanet.com/projects/ch ... irpOnLinux

Thanks!

User avatar
BV206
Posts: 474
Joined: Sat Mar 09, 2019 10:55 am

Re: Update Chirp

#14 Post by BV206 »

The easy way to install the latest version of Chirp on MX or Debian now is to use pip or pipx to install the current chirp-next .whl (python wheel) file from their web site. As far as I can tell there is no longer any current .deb repo package.

kd4e
Posts: 260
Joined: Mon Dec 06, 2021 5:26 pm

Re: Update Chirp

#15 Post by kd4e »

BV206 wrote: Thu Jul 20, 2023 10:17 am The easy way to install the latest version of Chirp on MX or Debian now is to use pip or pipx to install the current chirp-next .whl (python wheel) file from their web site. As far as I can tell there is no longer any current .deb repo package.
I'm unfamiliar with "pip" or "pipx". I take it that "pip" is command line and "pipx" includes a UI?

Will they handle all dependencies properly, for MX, and is there any systemd dependency (I have a non systemd install).

Thanks!

User avatar
BV206
Posts: 474
Joined: Sat Mar 09, 2019 10:55 am

Re: Update Chirp

#16 Post by BV206 »

kd4e wrote: Thu Jul 20, 2023 10:45 am I'm unfamiliar with "pip" or "pipx". I take it that "pip" is command line and "pipx" includes a UI?
No. They are utilities for python applications.

pip is the command for the python3-pip package:
Description: Python package installer
pip is the Python package installer. It integrates with virtualenv, doesn't
do partial installs, can save package state for replaying, can install from
non-egg sources, and can install from version control repositories.


pipx is another package:
Description: execute binaries from Python packages in isolated environments
pipx allows you to...
* Run the latest version of a CLI application from a package
in a temporary virtual environment,
leaving your system untouched after it finishes.
* Install packages to isolated virtual environments,
while globally exposing their CLI applications
so you can run them from anywhere.
* Easily list, upgrade, and uninstall packages
that were installed with pipx.


Both are in the standard Debian 12 (MX 23) repos.
On Debian 11 (MX 21) python3-pip is in the standard Debian 11 repo and pipx is in the Backports repo.

I know very little about about Python, pip and pipx. I just read and follwed the instructions on the Chirp web site.

kd4e
Posts: 260
Joined: Mon Dec 06, 2021 5:26 pm

Re: Update Chirp

#17 Post by kd4e »

BV206 wrote: Thu Jul 20, 2023 12:02 pm I know very little about about Python, pip and pipx. I just read and follwed the instructions on the Chirp web site.
OK, cool.

I've learned, the hard way, not to trust anything that doesn't originate in a MX Linux repository, or that's approved by a maintainer.

In the past I messed up my install by loading stuff without asking first.

Thanks.

User avatar
BV206
Posts: 474
Joined: Sat Mar 09, 2019 10:55 am

Re: Update Chirp

#18 Post by BV206 »

kd4e wrote: Thu Jul 20, 2023 10:45 am Will they handle all dependencies properly, for MX, and is there any systemd dependency (I have a non systemd install).
I missed this part. When you install python3-pip, and optionally pipx, they will install any required dependencies like any other package you install from a repo or from a .deb file.

The Chirp python package runs on MX 21 and 23 without systemd. In this case it doesn't appear that systemd is required. I don't know if that would be true for other python stuff.
kd4e wrote: Thu Jul 20, 2023 10:45 am I've learned, the hard way, not to trust anything that doesn't originate in a MX Linux repository, or that's approved by a maintainer.

In the past I messed up my install by loading stuff without asking first.
When you install Chirp with pip or pipx you don't use sudo. It creates some directories in your ~/.local directory and as far as I can tell it puts all the required files there and doesn't touch /usr or /opt or any other root level system directories. I'm not sure if it makes a .desktop menu file for Chirp because I already had a custom one. I don't think it can break your system and I don't know if that's true for other things installed by pip/pipx.

User avatar
CharlesV
Global Moderator
Posts: 7054
Joined: Sun Jul 07, 2019 5:11 pm

Re: Update Chirp

#19 Post by CharlesV »

It is a really good idea to at least create a timeshift snapshot before anything your unsure about. (and frankly, its just a good idea to have one scheduled.)

I have found a great thing is to have timeshift do a snapshot daily, late in the evening when I am off my machines... then I can safely do pretty much anything the next day knowing I have a fall back :-)
*QSI = Quick System Info from menu (Copy for Forum)
*MXPI = MX Package Installer
*Please check the solved checkbox on the post that solved it.
*Linux -This is the way!

kd4e
Posts: 260
Joined: Mon Dec 06, 2021 5:26 pm

Re: Update Chirp

#20 Post by kd4e »

CharlesV wrote: Thu Jul 20, 2023 2:27 pm It is a really good idea to at least create a timeshift snapshot before anything your unsure about. (and frankly, its just a good idea to have one scheduled.)

I have found a great thing is to have timeshift do a snapshot daily, late in the evening when I am off my machines... then I can safely do pretty much anything the next day knowing I have a fall back :-)
Excellent point! As a former systems manager I should know better than to slack on backups ...

Post Reply

Return to “Package Requests - MX-21”