Syntax error in Python Fir Filter script

33 views
Skip to first unread message

mike....@gmail.com

unread,
Jul 30, 2024, 2:45:15 PM7/30/24
to mmbtools
The Gnu Radio firdes plugin syntax appears to have changed. The python script should call .low_pass etc and not _low_pass etc.
Mike D.

Matthias Brändli

unread,
Aug 1, 2024, 9:14:46 AM8/1/24
to crc-mm...@googlegroups.com
Hi Mike,

if you can fix it, please send us the updated version. And let us know
for what GNURadio version it is compatible.

mpb
> --
> You received this message because you are subscribed to the Google
> Groups "mmbtools" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to crc-mmbtools...@googlegroups.com
> <mailto:crc-mmbtools...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/crc-mmbtools/51ea72a1-422d-4660-b40b-cf17b9afe371n%40googlegroups.com <https://groups.google.com/d/msgid/crc-mmbtools/51ea72a1-422d-4660-b40b-cf17b9afe371n%40googlegroups.com?utm_medium=email&utm_source=footer>.

mike....@gmail.com

unread,
Aug 9, 2024, 2:00:26 PM8/9/24
to mmbtools
Currently in Github files:-
taps = digital.filter.firdes_low_pass(gain, sampling_freq, cutoff, transition_width) # hamming window
Working syntax now:-
taps = digital.filter.firdes.low_pass(gain, sampling_freq, cutoff, transition_width) # hamming window
Note that 'low' is preceded by a '.' not a '_'
The GNU Radio version appears to be :-

GNU Radio Manual and C++ API Reference  3.10.9.1
The Free & Open Software Radio Ecosystem

- Using the URL in the commented text but Gnu Radio Companion Help file says 3.10.9.2 (Python 3.12.3)

Which suggested that a full stop was necessary before 'low' so I just tried it and the expected 19 tap file was generated after it had failed with the underscore.
Mike D.

mike....@gmail.com

unread,
Aug 9, 2024, 2:07:57 PM8/9/24
to mmbtools

This was the error message with the underscore:-
Traceback (most recent call last):
  File "/home/$(USERNAME)/ODR/ODR-DabMod/doc/fir-filter/./generate-filter.py", line 59, in <module>

    taps = digital.filter.firdes_low_pass(gain, sampling_freq, cutoff, transition_width) # hamming window
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'gnuradio.filter' has no attribute 'firdes_low_pass'
Reply all
Reply to author
Forward
0 new messages