The ft8_qso.conf.is a data input file - or a yaml file - it is read by the python code.
If there's a problem with the python code, the application will crash and burn regardless of the content of ft8_qso.conf.
If you change the the top line in the file
run_response.py code
from
#!/usr/bin/env python
to
#!/usr/bin/env python3
it should work.
-- Cinaed
You are confusing main() in run_response.py with the 'main' section in ft8_qso.conf.parser.get in line 36 is looking for the 'main' section but throws the NoSectionError.Why can't the parser see the 'main' section?When I said I have run an OOT before, I meant another OOT which runs well in this same app. However, this is irrelevant since we are not talking about the same problem.JimFrom: Cinaed SimsonSent: Monday, December 12, 2022 12:57 AMTo: Elmore FamilySubject: Re: Import error using an OOTThe main method is defined beginning on line 216 and called 4 times on lines 36-39.
And it appears the configparser is throwing the NoSectionError.
Try commenting out line 36 to see if line 37 throws the same exception.
When you said is has run before, did it run under python3.9?
-- Cinaed
On 12/11/22 19:11, Elmore Family wrote:
I have attached the 2 files in question. Look at the beginning of run_response.py. It uses ConfigParser to access the ft8_qso.conf configuration file.This line seems to be the problem: my_call = str(parser.get('main', 'my_call_sign')).But 'main' is a section in the ft8_qso.conf file. Why can't it find 'main'?JimFrom: Cinaed SimsonSent: Sunday, December 11, 2022 8:52 PMTo: Elmore FamilySubject: Re: Import error using an OOTThe problem appears to be in the python code
response.py
- there is no 'main()' method.
-- Cinaed
On 12/11/22 09:48, Elmore Family wrote:
Here is the result:pi@raspberrypi:~ $ python3
Python 3.9.2 (default, Mar 12 2021, 04:06:34)
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ft8
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.9/dist-packages/ft8/__init__.py", line 23, in <module>
from .run_response import run_response
File "/usr/local/lib/python3.9/dist-packages/ft8/run_response.py", line 36, in <module>
my_call = str(parser.get('main', 'my_call_sign'))
File "/usr/lib/python3.9/configparser.py", line 781, in get
d = self._unify_values(section, vars)
File "/usr/lib/python3.9/configparser.py", line 1149, in _unify_values
raise NoSectionError(section) from None
configparser.NoSectionError: No section: 'main'Jim
Type
python3
then enter
import ft8
and see if it works.
-- Cinaed
On 12/9/22 18:33, Elmore's wrote:
I have created an OOT which when I incorporate it in my flowgraph shows the following error:Failed to evaluate import expression 'import ft8'The yaml file is:id: ft8_run_responselabel: ft8category: '[ft8]'templates:imports: import ft8make: ft8.run_response(${ft8_button})callbacks:- set_ft8(${ft8_button})# Make one 'parameters' list entry for every parameter you want settable from the GUI.# Keys include:# * id (makes the value accessible as keyname, e.g. in the make entry)# * label (label shown in the GUI)# * dtype (e.g. int, float, complex, byte, short, xxx_vector, ...)# * defaultparameters:- id: ft8_buttonlabel: ft8_buttondtype: rawdefault: 0# 'file_format' specifies the version of the GRC yml format used in the file# and should usually not be changed.file_format: 1I have developed and used an OOT before without an issue. I looked at the previous OOT and reviewed the GNU Radio docs on OOTs without seeing anything different.I am using Python 3.92 with GNU radio 3.9.4.0 on a Raspberry Pi.I hope someone can show me the error of my ways.Jim
Virus-free.www.avg.com
No comments:
Post a Comment