Struggling with 3.10 OOT Module Porting: AttributeError: module has no attribute

2022-09-09 Thread Bachmaier, Luca
Dear all,

I'm currently porting some of my modules from GNU Radio 3.8 to 3.10 and 
experiencing issues with (probably) pybind. My system setup is: Debian 11, GNU 
Radio 3.10.3.0.

My flow graphs that include the 3.8 modules are able to compile, but are not 
able to run due to the following error:
File "home/user/.grc_gnuradio/myModule_sync.py", line 56 in 
__init__
  Self.myModule_myblock_0 = myModule.myblock(0, 0)
  AttributeError: module 'myModule' has no attribute 'myblock'

So far I've checked

* That all CMakeFiles.txt in my module folder are similar to the ones 
that are generated with gr_modtool from 3.10

* That gr-myModule/python/myModule/bindings/python_bindings.cc contains 
this function call:
bind_myblock(m);

Calling import myModule and dir(myModule) in Python returns the following:
['__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', 
'__package__', '__path__', '__spec__', 'os', 'myModule_python']
Calling dir(myModule.myModule_python) prints this:
['__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__']

Comparing the call dir(myModule) to my setup with GNU Radio 3.8, all of my 
custom blocks should be listed.
I would be very happy if someone could help me.

Thanks in advance and regards,
Luca




AW: Struggling with 3.10 OOT Module Porting: AttributeError: module has no attribute

2022-09-12 Thread Bachmaier, Luca
Hello Vasil,



Thank you for your help. Editing python/__init__.py did solve my current 
problem: After changing the exception handling to the following I was able to 
move on to other issues while porting.



try:

# this might fail if the module is python-only

from .myModule_python import *

except ImportError:

dirname, filename = os.path.split(os.path.abspath(__file__))

__path__.append(os.path.join(dirname, "bindings"))

from . myModule _python import *

except ModuleNotFoundError:

dirname, filename = os.path.split(os.path.abspath(__file__))

__path__.append(os.path.join(dirname, "bindings"))

from . myModule_python import *





Re-installing my module gave me this cmake error:



CMake Error at lib/CMakeLists.txt … Target “gnuradio-myModule” 
links to: gnuradio::gnuradio-fec but the target was not found.



I was able to solve this by removing the gnuradio:: qualifier from gnuradio-fec 
and gnuradio-analog. For some reason, only gnuradio-fec but not 
gnuradio::gnuradio-fec is known. Could this be an unintended bug? Under Gnu 
Radio 3.8.5 gnuradio::gnuradio-fec was able to be found.





But right now I’m struggling with a new problem that I’m unable to solve:

Calling import myModule_python in gr-myModule/build/python/myModule/bindings/ 
throws a segmentation fault which gets traced back to 
/usr/local/lib/python3.10/dist-packages/gnuradio/gr/__init__.py



The line responsible for the segfault is:

log.set_level(prefs().get_string("LOG", "log_level", "notset"))



Context for the line:

log = gr.logger("log")

log.set_level(prefs().get_string("LOG", "log_level", "notset"))

log_debug = gr.logger("log_debug")



Again I would be very thankful if someone could help me.



Thank you and regards,

Luca



>-Ursprüngliche Nachricht-

>Von: Vasil Velichkov 

>Gesendet: Freitag, 9. September 2022 15:06

>An: Bachmaier, Luca ; discuss-

>gnura...@gnu.org

>Betreff: Re: Struggling with 3.10 OOT Module Porting: AttributeError: module

>has no attribute

>

>Hi Luca,

>

>On 09/09/2022 10.58, Bachmaier, Luca wrote:

>> Dear all,

>>

>> I'm currently porting some of my modules from GNU Radio 3.8 to 3.10 and

>experiencing issues with (probably) pybind. My system setup is: Debian 11,

>GNU Radio 3.10.3.0.

>>

>> My flow graphs that include the 3.8 modules are able to compile, but are not

>able to run due to the following error:

>> File "home/user/.grc_gnuradio/myModule_sync.py", line 56 in

>__init__

>>   Self.myModule_myblock_0 = myModule.myblock(0, 0)

>>   AttributeError: module 'myModule' has no attribute 'myblock'

>

>Open `python/__init__.py`, check if there is `except ImportError:` and replace

>it with `except ModuleNotFoundError:`, then reinstall and try again.

>

>See also https://github.com/gnuradio/gnuradio/issues/3884

>

>Regards,

>Vasil


AW: AW: AW: Struggling with 3.10 OOT Module Porting: AttributeError: module has no attribute

2022-09-20 Thread Bachmaier, Luca
Hello Vasil,

>Having two versions like this could cause various hard to debug problems so
>my advice is first to clean up your system, uninstall all gnuradio versions,
>manually check and remove all gnuradio's files in /usr and /usr/local (find 
>/usr
>-name "*gnuradio*) and then install only one version.
Yes, it seems like this is the best option. For now I have moved onto a VM 
where I try to port the blocks one by one, which works a lot better so far.
Once I know that the module works in my VM, I'll try to move it to my main 
system.

Again thanks for all your input and best wishes
Luca




GRC: Cannot find "RFNoC Fosphor" blocks

2023-09-04 Thread Bachmaier, Luca
Hey everyone,

I'm currently implementing a flowgraph that uses RFNoC by UHD / Ettus Research. 
In GNU Radio companion, I noticed that there are no blocks "RFNoC Fosphor 
Block" and "RFNoC Qt Fosphor Display" available (See this workshop 
https://www.youtube.com/watch?v=M9ntwQie9vs @ 22:13 for a flowgraph that uses 
them). My basic software setup is:

-  OS: Debian 12

-  GNU Radio 3.10.5.1

-  UHD 4.3.0.0+ds1-5

I was wondering why these blocks aren't available or if I need to install an 
additional module in order to get them. The module gr-fosphor 
(https://projects.osmocom.org/projects/sdr/wiki/Fosphor) just installs the 
"standard" version of Fosphor, *not* the FPGA / RFNoC implementation.

Thank you and regards
Luca


GRC: Cannot find "RFNoC Fosphor" blocks

2023-09-04 Thread Bachmaier, Luca
Hi Johannes,

thank you for your reply. Where can I find this module? The gr-ettus module 
(https://github.com/EttusResearch/gr-ettus) is apparently not required for 
3.10, on the site it says "Use gr-uhd directly".

That aside I'm installing GNU Radio 3.10.7 right now which should contain the 
RFNoC Fosphor blocks (as opposed to my current version 3.10.5).

Regards
Luca

>-Ursprüngliche Nachricht-
>Von: discuss-gnuradio-bounces+luca.bachmaier=iis.fraunhofer...@gnu.org
> Im
>Auftrag von Johannes Demel
>Gesendet: Montag, 4. September 2023 14:30
>An: discuss-gnuradio@gnu.org
>Betreff: Re: GRC: Cannot find "RFNoC Fosphor" blocks
>
>Hi Luca,
>
>you need to install the OOT module that includes the RFNoC version of
>fosphor.
>
>Cheers
>Johannes
>
>On 04.09.23 13:00, Bachmaier, Luca wrote:
>> Hey everyone,
>>
>> I’m currently implementing a flowgraph that uses RFNoC by UHD / Ettus
>> Research. In GNU Radio companion, I noticed that there are no blocks
>> “RFNoC Fosphor Block” and “RFNoC Qt Fosphor Display” available (See this
>> workshop https://www.youtube.com/watch?v=M9ntwQie9vs
>> <https://www.youtube.com/watch?v=M9ntwQie9vs> @ 22:13 for a
>flowgraph
>> that uses them). My basic software setup is:
>>
>> -OS: Debian 12
>>
>> -GNU Radio 3.10.5.1
>>
>> -UHD 4.3.0.0+ds1-5
>>
>> I was wondering why these blocks aren’t available or if I need to
>> install an additional module in order to get them. The module gr-fosphor
>> (https://projects.osmocom.org/projects/sdr/wiki/Fosphor
>> <https://projects.osmocom.org/projects/sdr/wiki/Fosphor>) just installs
>> the “standard” version of Fosphor, **not** the FPGA / RFNoC
>implementation.
>>
>> Thank you and regards
>>
>> Luca
>>


Re: GRC: Cannot find "RFNoC Fosphor" blocks

2023-09-05 Thread Bachmaier, Luca
Hey everyone,

I was able to solve this problem now: my installed version of GNU Radio 
(3.10.5) simply didn’t contain the Fosphor blocks. After removing this version 
and installing GR 3.10.7 from source the blocks are now available in GRC. (See 
release notes for GR 3.10.6, “gr-uhd” 
https://www.gnuradio.org/news/2023-07-19-gnuradio-v3.10.7.0-release/)

So far I’m struggling with getting Fosphor to start, Error “[!] CL Error 
(-1001, …): Unable to fetch platform IDs”. I wasn’t able to find any up-to-date 
help about this online. How did you install Fosphor / OpenGL? I’m using a AMD 
CPU and since AMD stopped supporting OpenGL I had to switch over to POCL.

Regards
Luca

Von: Clint Scarborough 
Gesendet: Montag, 4. September 2023 15:13
An: discuss-gnuradio@gnu.org; Bachmaier, Luca 
; Johannes Demel ; 
discuss-gnuradio@gnu.org
Betreff: Re: GRC: Cannot find "RFNoC Fosphor" blocks

I'm not sure about UHD 4.3, but the blocks are available for me with UHD 4.4 
and GR 3.10.

However, the RFNoC Fosphor display block bogs down the GUI so much that it's 
practically unusable.  I haven't been able to look into what's wrong, or 
whether I'm doing something wrong though.
-- Clint

On September 4, 2023 12:51:10 PM UTC, "Bachmaier, Luca" 
mailto:luca.bachma...@iis.fraunhofer.de>> 
wrote:

Hi Johannes,

thank you for your reply. Where can I find this module? The gr-ettus module 
(https://github.com/EttusResearch/gr-ettus) is apparently not required for 
3.10, on the site it says "Use gr-uhd directly".

That aside I'm installing GNU Radio 3.10.7 right now which should contain the 
RFNoC Fosphor blocks (as opposed to my current version 3.10.5).

Regards
Luca

-Ursprüngliche Nachricht-
Von: 
discuss-gnuradio-bounces+luca.bachmaier=iis.fraunhofer...@gnu.org<mailto:discuss-gnuradio-bounces+luca.bachmaier=iis.fraunhofer...@gnu.org>
mailto:discuss-gnuradio-bounces+luca.bachmaier=iis.fraunhofer...@gnu.org>>
 Im
Auftrag von Johannes Demel
Gesendet: Montag, 4. September 2023 14:30
An: discuss-gnuradio@gnu.org<mailto:discuss-gnuradio@gnu.org>
Betreff: Re: GRC: Cannot find "RFNoC Fosphor" blocks

Hi Luca,

you need to install the OOT module that includes the RFNoC version of
fosphor.

Cheers
Johannes

On 04.09.23 13:00, Bachmaier, Luca wrote:

 Hey everyone,

 I’m currently implementing a flowgraph that uses RFNoC by UHD / Ettus
 Research. In GNU Radio companion, I noticed that there are no blocks
 “RFNoC Fosphor Block” and “RFNoC Qt Fosphor Display” available (See this
 workshop https://www.youtube.com/watch?v=M9ntwQie9vs
 <https://www.youtube.com/watch?v=M9ntwQie9vs> @ 22:13 for a

flowgraph

 that uses them). My basic software setup is:

 -OS: Debian 12

 -GNU Radio 3.10.5.1

 -UHD 4.3.0.0+ds1-5

 I was wondering why these blocks aren’t available or if I need to
 install an additional module in order to get them. The module gr-fosphor
 (https://projects.osmocom.org/projects/sdr/wiki/Fosphor
 <https://projects.osmocom.org/projects/sdr/wiki/Fosphor>) just installs
 the “standard” version of Fosphor, **not** the FPGA / RFNoC

implementation.

 Thank you and regards

 Luca