Removing OOT modules from upgraded gnuradio

2022-12-11 Thread Yotam Rabin
Hi all!
I upgraded to Ubuntu 22.04, and with it upgraded gnuradio to version 3.10.
Because of that I need to remove all OOT modules, which didn't succeed when
using "make uninstall" as it gives out a swig error due to swig not being
used anymore. I also tried using apt-purge without success.

Is there a way to remove all oot modules from gnuradio/reinstall a
truly clean gnuradio?

Thanks,
Yotam


Fwd: how to make stream demux block in python

2022-12-11 Thread Jeff Long
There is a built-in Stream Demux block you could use. Do you specifically
need it to be in Python?

On Sun, Dec 11, 2022 at 1:33 AM Sumit Agrawal (P19EE207) <
agrawal...@iitj.ac.in> wrote:

> Hi everyone,
> Can anyone tell me how to make a stream demuxing block to demultiplex one
> stream into N output streams?
>
> Demuxes a stream producing N outputs streams that contain n_0 items in the
> first stream, n_1 items in the second, etc., and repeats. Tags are
> propagated. The number of items in each output stream is specified using
> the lengths parameter like so [n_0, n_1, ..., n_N-1].
>
> Example:
> lengths = [2,3,4,5]
>
> input stream = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, ...]
> output_stream_0 = [0, 1, 14, 15, ...]
> output_stream_1 = [2, 3, 4, 16, ...]
> output_stream_2 = [5, 6, 7, 8, ...]
> output_stream_2 = [9, 10, 11, 12, 13 ...]
>
> --
>
>
>
>
> *Thanks & Regards,Sumit Kumar AgrawalPh.D. (Electrical Engineering)Indian
> Institute of TechnologyJodhpur, Rajasthan-342037*
> *Mob. No.- 8410957412*
> ᐧ
>


Re: how to make stream demux block in python

2022-12-11 Thread Jeff Long
Right, it's not in 3.8. Here's the implementation in C++ for more recent
versions. You could translate this to Python if you want. Note that it's a
block (not a sync block) so you implement general_work() rather than work().

https://github.com/gnuradio/gnuradio/blob/main/gr-blocks/lib/stream_demux_impl.cc

On Sun, Dec 11, 2022 at 8:24 AM Sumit Agrawal (P19EE207) <
agrawal...@iitj.ac.in> wrote:

> Hi Jeff,
>
> I can't see any stream demux block in gnu radio 3.8.
> Yes, I need specifically in Python
>
>
> 
> Thanks & Regards,
> Sumit Kumar Agrawal,
> Ph.D. (Electrical Engineering)
> Indian Institute of Technology,
> Jodhpur, Rajasthan-342037
> Mobile No. +91-8410957412
>
> On Sun, 11 Dec, 2022, 5:56 pm Jeff Long,  wrote:
>
>> There is a built-in Stream Demux block you could use. Do you specifically
>> need it to be in Python?
>>
>> On Sun, Dec 11, 2022 at 1:33 AM Sumit Agrawal (P19EE207) <
>> agrawal...@iitj.ac.in> wrote:
>>
>>> Hi everyone,
>>> Can anyone tell me how to make a stream demuxing block to demultiplex
>>> one stream into N output streams?
>>>
>>> Demuxes a stream producing N outputs streams that contain n_0 items in
>>> the first stream, n_1 items in the second, etc., and repeats. Tags are
>>> propagated. The number of items in each output stream is specified using
>>> the lengths parameter like so [n_0, n_1, ..., n_N-1].
>>>
>>> Example:
>>> lengths = [2,3,4,5]
>>>
>>> input stream = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, ...]
>>> output_stream_0 = [0, 1, 14, 15, ...]
>>> output_stream_1 = [2, 3, 4, 16, ...]
>>> output_stream_2 = [5, 6, 7, 8, ...]
>>> output_stream_2 = [9, 10, 11, 12, 13 ...]
>>>
>>> --
>>>
>>>
>>>
>>>
>>> *Thanks & Regards,Sumit Kumar AgrawalPh.D. (Electrical
>>> Engineering)Indian Institute of TechnologyJodhpur, Rajasthan-342037*
>>> *Mob. No.- 8410957412*
>>> ᐧ
>>>
>>


Re: Import error using an OOT

2022-12-11 Thread Elmore Family
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 "", line 1, in 
  File "/usr/local/lib/python3.9/dist-packages/ft8/__init__.py", line 23, in 

from .run_response import run_response
  File "/usr/local/lib/python3.9/dist-packages/ft8/run_response.py", line 36, 
in 
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




From: Cinaed Simson
Sent: Sunday, December 11, 2022 12:15 AM
To: discuss-gnuradio@gnu.org
Subject: Re: Import error using an OOT

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_response
  label: ft8
  category: '[ft8]'

  templates:
imports: import ft8
make: 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, ...)
  # * default
  parameters:
  - id: ft8_button
label: ft8_button
dtype: raw
default: 0

  #  'file_format' specifies the version of the GRC yml format used in the file
  #  and should usually not be changed.
  file_format: 1

  I 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




--
This email has been checked for viruses by AVG antivirus software.
www.avg.com

Re: Import error using an OOT

2022-12-11 Thread Cinaed Simson

The 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 "", line 1, in 
File "/usr/local/lib/python3.9/dist-packages/ft8/__init__.py", line 
23, in 

from .run_response import run_response
File "/usr/local/lib/python3.9/dist-packages/ft8/run_response.py", 
line 36, in 

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


*From:* Cinaed Simson
*Sent:* Sunday, December 11, 2022 12:15 AM
*To:* discuss-gnuradio@gnu.org
*Subject:* Re: Import error using an OOT
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_response
label: ft8
category: '[ft8]'
templates:
  imports: import ft8
  make: 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, ...)
# * default
parameters:
- id: ft8_button
  label: ft8_button
  dtype: raw
  default: 0
#  'file_format' specifies the version of the GRC yml format used in 
the file

#  and should usually not be changed.
file_format: 1
I 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 
 







Re: Import error using an OOT

2022-12-11 Thread Elmore Family
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’?

Jim


From: Cinaed Simson
Sent: Sunday, December 11, 2022 8:52 PM
To: Elmore Family
Cc: discuss-gnuradio@gnu.org
Subject: Re: Import error using an OOT

The 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 "", line 1, in 
File "/usr/local/lib/python3.9/dist-packages/ft8/__init__.py", line 23, in 

  from .run_response import run_response
File "/usr/local/lib/python3.9/dist-packages/ft8/run_response.py", line 36, 
in 
  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



  From: Cinaed Simson
  Sent: Sunday, December 11, 2022 12:15 AM
  To: discuss-gnuradio@gnu.org
  Subject: Re: Import error using an OOT

  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_response
label: ft8
category: '[ft8]'

templates:
  imports: import ft8
  make: 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, ...)
# * default
parameters:
- id: ft8_button
  label: ft8_button
  dtype: raw
  default: 0

#  'file_format' specifies the version of the GRC yml format used in the 
file
#  and should usually not be changed.
file_format: 1

I 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






--
This email has been checked for viruses by AVG antivirus software.
www.avg.com

ft8_qso.conf
Description: Binary data


run_response.py
Description: Binary data


Re: Import error using an OOT

2022-12-11 Thread Cinaed Simson
The 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’?

Jim
*From:* Cinaed Simson
*Sent:* Sunday, December 11, 2022 8:52 PM
*To:* Elmore Family
*Cc:* discuss-gnuradio@gnu.org
*Subject:* Re: Import error using an OOT
The 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 "", line 1, in 
File "/usr/local/lib/python3.9/dist-packages/ft8/__init__.py", line 
23, in 

from .run_response import run_response
File "/usr/local/lib/python3.9/dist-packages/ft8/run_response.py", 
line 36, in 

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

*From:* Cinaed Simson
*Sent:* Sunday, December 11, 2022 12:15 AM
*To:* discuss-gnuradio@gnu.org
*Subject:* Re: Import error using an OOT
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_response
label: ft8
category: '[ft8]'
templates:
  imports: import ft8
  make: 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, ...)
# * default
parameters:
- id: ft8_button
  label: ft8_button
  dtype: raw
  default: 0
#  'file_format' specifies the version of the GRC yml format used in 
the file

#  and should usually not be changed.
file_format: 1
I 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