Project

General

Profile

Actions

Bug #8857

closed

SyntaxError: invalid syntax running setup

Added by Paul Wheeler about 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
03/02/2021
Due date:
% Done:

0%

Estimated time:
Chirp Version:
daily
Model affected:
Installation
Platform:
Linux
Debug Log:
I read the instructions above:

Description

Attempted to run setup.py
Got this error message:
File "setup.py", line 17
print "Set chirp/init.py::all = %s" % str(chirp.all)
^
SyntaxError: invalid syntax

Actions #1

Updated by Rudolph Gutzerhagen about 3 years ago

There is a significant amount of information missing from your report.
Are you new to Chirp?
Are you a user or a developer? How much experience?
What platform (windows, mac, linux; version) are you running.
What is your purpose for running setup? What are you trying to achieve?
Without any information, your report is likely to be dismissed as PEBKAC.

Actions #2

Updated by Uwe Winter about 3 years ago

Looks like he is using python3 to run python2 code. @Paul Wheeler can you please use python2?

Also the above still holds: Why are you using setup and what are you trying to achieve?

Actions #3

Updated by Paul Wheeler about 3 years ago

Are you new to Chirp? Yes
Are you a user or a developer? User How much experience? enough
What platform (windows, mac, linux; version) are you running. Mint Linux cinnamon 20
What is your purpose for running setup? To get the program installed so I can run it. What are you trying to achieve? Program my radio (uvr-5) There is no Chirp in my version of synaptic.

Without any information, your report is likely to be dismissed as PEBKAC. I saw no place to enter the above data. No not pebcak!

Looks like he is using python3 to run python2 code. @Paul Wheeler can you please use python2?

I ran python. Did not know that it was 3 versus your 2.

I ran python2 and got these different errors:

python2 setup.py
No handlers could be found for logger "chirp.drivers.anytone778uv"
Traceback (most recent call last):
File "setup.py", line 6, in
from chirp.drivers import *
File "/home/paul/Downloads/chirp-daily-20210212/chirp/drivers/generic_xml.py", line 17, in
import libxml2
ImportError: No module named libxml2

Per synaptic, libxml2 IS installed. Version 2.9.10+dfsg-5 Gnome xml library

Here is my system information:

inxi
CPU: 6-Core AMD Ryzen 5 2600 (-MT MCP-) speed/min/max: 1376/1550/3400 MHz
Kernel: 5.4.0-65-generic x86_64 Up: 33d 20h 50m
Mem: 6520.7/16021.1 MiB (40.7%) Storage: 1.82 TiB (26.7% used) Procs: 300
Shell: bash 5.0.17 inxi: 3.0.38

inxi - S

System:
Host: paulx64mintlinux19 Kernel: 5.4.0-65-generic x86_64 bits: 64
Desktop: Cinnamon 4.6.7 Distro: Linux Mint 20 Ulyana

Actions #4

Updated by Rudolph Gutzerhagen about 3 years ago

great Paul. Thank you for taking the time to answer the questions. From what I see you have the Chirp source on your computer. Don't know if you did this with a mercurial clone, or grabbed it some other way. Will assume it is current.
For a user, running Chirp from source is doable, but not the best way, and not advisable. If you ask for help, you will not likely easily find a version number. You can try runnning the following while I look up my debian/ubuntu notes. You may run into error messages related to package/module dependencies.
Navigate to your chirp directory. Execute python chirpw --log ~/chirp_debug.log --log-level debug

Actions #5

Updated by Rudolph Gutzerhagen about 3 years ago

I tried something like this on Debian 10 and Ubuntu:

o sudo apt install flatpak
o sudo flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
o flatpak remotes ==> 'flathub system'
o sudo flatpak update
o flatpak list --app ==> 'could be an empty list'
o sudo flatpak install ~/Downloads/chirp-daily-20210212.flatpak

N.B. the ==> is not part of the command but a cue to watch for something like that which follows.
You must make sure that you have a suitable flatpak remote hub in order to pick up the freedesktop dependency.
see the jpg attachment in issue #8571 .

Good Luck.

P.S. setup.py is used to build a distribution package. I have not yet had success running a build myself.
Also, the top right of the Chirp homepage, download page, activity page, etc. has a search box you can use.
Also, on the homepage, in getting started, there is a section on getting help, that will lead you to the mail list where you can ask for general help.

Actions #6

Updated by Paul Wheeler about 3 years ago

Thank you for helping me.

All I wanted to do do was to download/install/run chirp.

I found no package in the mint linux synaptic package manager for chirp, so I went to the chirp website at [1]. All I found for linux was the tar and flatpak files. Per the instructions at the bottom of the page at [1]. I downloaded and unpacked the tar file, hence the source (setup.py) file that I attempted to run, thinking it was an installation script.

I did research and found that flatpak is used to package programs, which was new information for me. I then tried running flatpak, because it was installed on my system. Unfortunately, the flatpak program did not think that 'flatpak chirp-daily-20210212.flatpak' and several variations were valid commands. I later found that there was an error in the 'flatpak' documentation! A bug report for that is being written.

I was left wondering where the package for mint linux (debian) installation is located.

Hence my 'bug' report.

Once I figured out the correct way to invoke the flatpak program, it "installed" the chirp software. Unfortunately, the command "chirp" did NOT work, nor was there a 'man' page for it. So, now it is 'installed' with no clue on how to run it.

I assume the person that created the flatpak file ]2] will need to look into this.

So, now what do I do?

[1] https://trac.chirp.danplanet.com/chirp_daily/LATEST/
[2] chirp-daily-20210212.flatpak

Actions #7

Updated by Rudolph Gutzerhagen about 3 years ago

if I recall correctly, there should be a link/icon installed into you wm interface, that should launch the application. Let me know if you need more details.

Actions #8

Updated by Rudolph Gutzerhagen about 3 years ago

check that the app is in flatpak:

flatpak list --app ==> chirp com.danplanet.chirp

run the application from the installed icon or
from the terminal:

flatpak run com.danplanet.chirp

Actions #9

Updated by Bernhard Hailer about 3 years ago

  • Priority changed from Urgent to Normal
  • Model affected changed from (All models) to Installation
  • Platform changed from Windows to Linux

... and please let us know whether it worked for you. Thanks!

Actions #10

Updated by Bernhard Hailer almost 3 years ago

  • Status changed from New to Closed

No more feedback by submitter.

Actions

Also available in: Atom PDF