FS#72672 - gnuradio-osmosdr is broken with newest version of gnuradio

Attached to Project: Community Packages
Opened by Aaron (a9cl1) - Tuesday, 09 November 2021, 00:58 GMT
Last edited by David Runge (dvzrv) - Monday, 16 January 2023, 14:39 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Kyle Keen (keenerd)
Architecture x86_64
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description: gnuradio-osmosdr is broken with newest version of gnuradio


Additional info:
* package version(s)

gr-osmosdr 0.2.0.0
gnuradio 3.9.3.0

* config and/or log files etc.

$ osmocom_fft
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
gr-osmosdr 0.2.0.0 (0.2.0) gnuradio 3.9.3.0
built-in source types: file rtl rtl_tcp uhd hackrf bladerf rfspace airspy soapy redpitaya
[INFO] [UHD] linux; GNU C++ version 11.1.0; Boost_107600; UHD_4.1.0.1-0-unknown
Using HackRF One with firmware 2021.03.1
Traceback (most recent call last):
File "/usr/local/bin/osmocom_fft", line 714, in <module>
main()
File "/usr/local/bin/osmocom_fft", line 690, in main
tb = app_top_block(qapp.arguments(), "osmocom Spectrum Browser")
File "/usr/local/bin/osmocom_fft", line 297, in __init__
self.scope_win = sip.wrapinstance(self.scope.pyqwidget(), Qt.QWidget)
AttributeError: 'gnuradio.qtgui.qtgui_python.freq_sink_c' object has no attribute 'pyqwidget'
zsh: segmentation fault (core dumped) osmocom_fft


* link to upstream bug report, if any

https://github.com/gnuradio/gnuradio/issues/5175

Steps to reproduce:

Install latest gnuradio and gnuradio-osmosdr and run osmocom_fft.
This task depends upon

Closed by  David Runge (dvzrv)
Monday, 16 January 2023, 14:39 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed with gnuradio 3.10.5.0-2 and gnuradio-osmosdr 0.2.4-1
Comment by Doug Newgard (Scimmia) - Tuesday, 09 November 2021, 01:28 GMT
You're using stuff from /use/local, not the package
Comment by Aaron (a9cl1) - Tuesday, 09 November 2021, 01:32 GMT
True! I attempted to install it manually as well. Here is the log when I remove those:

osmocom_fft  INT ✘
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
gr-osmosdr 0.2.0.0 (0.2.0) gnuradio 3.9.3.0
built-in source types: file rtl rtl_tcp uhd hackrf bladerf rfspace airspy soapy redpitaya
[INFO] [UHD] linux; GNU C++ version 11.1.0; Boost_107600; UHD_4.1.0.1-0-unknown
Using HackRF One with firmware 2021.03.1
Traceback (most recent call last):
File "/usr/bin/osmocom_fft", line 714, in <module>
main()
File "/usr/bin/osmocom_fft", line 690, in main
tb = app_top_block(qapp.arguments(), "osmocom Spectrum Browser")
File "/usr/bin/osmocom_fft", line 297, in __init__
self.scope_win = sip.wrapinstance(self.scope.pyqwidget(), Qt.QWidget)
AttributeError: 'gnuradio.qtgui.qtgui_python.freq_sink_c' object has no attribute 'pyqwidget'
zsh: segmentation fault (core dumped) osmocom_fft

(same error)
Comment by Antonio Rojas (arojas) - Tuesday, 09 November 2021, 07:11 GMT
Output of

python -c 'import gnuradio; print(gnuradio.__file__)'

?
Comment by Aaron (a9cl1) - Tuesday, 09 November 2021, 07:36 GMT
/usr/lib/python3.9/site-packages/gnuradio/__init__.py
Comment by Vadim Yanitskiy (fixeria) - Saturday, 09 April 2022, 14:14 GMT
As of today, osmocom_fft is still broken:

'''
$ osmocom_fft -f 935M -g 40 -s 2M
Traceback (most recent call last):
File "/usr/bin/osmocom_fft", line 714, in <module>
main()
File "/usr/bin/osmocom_fft", line 690, in main
tb = app_top_block(qapp.arguments(), "osmocom Spectrum Browser")
File "/usr/bin/osmocom_fft", line 314, in __init__
self._build_gui()
File "/usr/bin/osmocom_fft", line 402, in _build_gui
self._fw = RangeWidget(self._fr, self.set_freq, 'Center Frequency (Hz)', eng_widget, float)
File "/usr/lib/python3.10/site-packages/gnuradio/qtgui/range.py", line 118, in __init__
self.d_widget = self.EngSlider(self, self.range, self.notifyChanged, rangeType, orientation)
File "/usr/lib/python3.10/site-packages/gnuradio/qtgui/range.py", line 320, in __init__
self.slider = RangeWidget.Slider(parent, ranges, self.sliderChanged, rangeType, orientation)
File "/usr/lib/python3.10/site-packages/gnuradio/qtgui/range.py", line 161, in __init__
self.setRange(0, ranges.nsteps - 1)
TypeError: setRange(self, int, int): argument 2 has unexpected type 'float'
'''

Looks like the bug has been fixed by the upstream: https://github.com/gnuradio/gnuradio/pull/5287.

gnuradio 3.9.4.0-2
gnuradio-osmosdr 0.2.3-8
Comment by Vadim Yanitskiy (fixeria) - Saturday, 14 May 2022, 11:28 GMT
With gnuradio 3.10.2.0-4 and gnuradio-osmosdr 0.2.3-9, I am not seeing the TypeError anymore, but there is another problem:

```
Traceback (most recent call last):
File "/usr/bin/osmocom_fft", line 714, in <module>
main()
File "/usr/bin/osmocom_fft", line 690, in main
tb = app_top_block(qapp.arguments(), "osmocom Spectrum Browser")
File "/usr/bin/osmocom_fft", line 297, in __init__
self.scope_win = sip.wrapinstance(self.scope.pyqwidget(), Qt.QWidget)
AttributeError: 'gnuradio.qtgui.qtgui_python.freq_sink_c' object has no attribute 'pyqwidget'. Did you mean: 'qwidget'?
Segmentation fault (core dumped)
```

Most likely, gnuradio-osmosdr has not been ported to gnuradio 3.10 yet.

Here is a quick workaround that makes it work:

sed -i "s/pyqwidget/qwidget/" /usr/bin/osmocom_fft

GNU Radio is such a mess...
Comment by Vadim Yanitskiy (fixeria) - Saturday, 14 May 2022, 11:49 GMT
I created a branch in the upstream repository:

https://gitea.osmocom.org/sdr/gr-osmosdr/src/branch/fixeria/gr3.10

with a fix for the AttributeError:

https://gitea.osmocom.org/sdr/gr-osmosdr/commit/7cd934cfc8d82230c3a06299620d89715ccc471b

and another fix for osmocom_siggen app:

https://gitea.osmocom.org/sdr/gr-osmosdr/commit/8d9e793998a3b22f81ac3e39cd80671ff3fde1f1

This branch does not show up at git.osmocom.org yet, it takes some time for our Gitea to sync...
Comment by David Runge (dvzrv) - Saturday, 14 January 2023, 17:17 GMT
Is this issue still present with current gnuradio (3.10.5.0)?
Comment by Vadim Yanitskiy (fixeria) - Monday, 16 January 2023, 14:29 GMT
> Is this issue still present with current gnuradio (3.10.5.0)?

Works fine with: gnuradio v3.10.5.0-2 and gnuradio-osmosdr v0.2.4-1. This task can be closed.
Comment by David Runge (dvzrv) - Monday, 16 January 2023, 14:39 GMT
Cool, thanks!

Loading...