Forum: GNU Radio Python chaos

B7282036e83c272d8d2dfa21ec3d8054?d=identicon&s=25 Stefan Gofferje (Guest)
on 2013-12-03 10:53
(Received via mailing list)
Attachment: smime.p7s (4 KB)
Hi,

I recently installed some stuff on my Opensuse 12.3, including gnuradio
and QGis2.

When using QT widgets, Gnuradio GRC fails with

Traceback (most recent call last):
  File "/home/sgofferj/top_block.py", line 12, in <module>
    from gnuradio import qtgui
  File "/usr/lib64/python2.7/site-packages/gnuradio/qtgui/__init__.py",
line 34, in <module>
    from qtgui_swig import *
  File
"/usr/lib64/python2.7/site-packages/gnuradio/qtgui/qtgui_swig.py", line
26, in <module>
    _qtgui_swig = swig_import_helper()
  File
"/usr/lib64/python2.7/site-packages/gnuradio/qtgui/qtgui_swig.py", line
22, in swig_import_helper
    _mod = imp.load_module('_qtgui_swig', fp, pathname, description)
ImportError: /usr/lib64/libgnuradio-qtgui-3.7.2.so.0.0.0: undefined
symbol: _ZN7QwtPlot17legendItemClickedEv


I don't know anything about Python. Some googling pointed towards
possible version conflicts but I can't determine, what exactly is the
problem. Could anyone bring light into the dark here?

-S
C539637020fd56193dd6daec746c4a84?d=identicon&s=25 Tom Rondeau (Guest)
on 2013-12-03 15:52
(Received via mailing list)
On Tue, Dec 3, 2013 at 4:52 AM, Stefan Gofferje
<lists@home.gofferje.net> wrote:
>   File "/usr/lib64/python2.7/site-packages/gnuradio/qtgui/__init__.py",
> ImportError: /usr/lib64/libgnuradio-qtgui-3.7.2.so.0.0.0: undefined
> symbol: _ZN7QwtPlot17legendItemClickedEv
>
>
> I don't know anything about Python. Some googling pointed towards
> possible version conflicts but I can't determine, what exactly is the
> problem. Could anyone bring light into the dark here?
>
> -S

You probably upgraded your system to use QT5, which won't work with
GNU Radio. See about finding a way to switch between QT4 and QT5 on
your Suse system.

Tom
B7282036e83c272d8d2dfa21ec3d8054?d=identicon&s=25 Stefan Gofferje (Guest)
on 2013-12-04 07:41
(Received via mailing list)
Attachment: smime.p7s (4 KB)
On 12/03/2013 04:50 PM, Tom Rondeau wrote:
> You probably upgraded your system to use QT5, which won't work with
> GNU Radio. See about finding a way to switch between QT4 and QT5 on
> your Suse system.

Nope, no QT5 here.

I posted the same question on the opensuse mailinglist some time ago and
Hans-Peter Jansen wrote:

---
The gnuradio app doesn't match the installed qwt lib. Something changed
in this area. I would check, which qwt version it is build against (on
build service, in build log) and install exactly that one.

Side note: I don't know about gnuradio, but this TB points to some
questionable concepts under its hood. The author is reinventing the
wheel by wrapping qwt himself - with swig. The point is, qwt is wrapped
already (called python-qwt5), and that's done in a "sane" way, using
python-sip - the same tool, that is used for python-qt{3,4} and
python-kde{3,4} wraps...
---

But again, I don't know anything about Python so I wouldn't know how to
diagnose the problem...

-S
B7282036e83c272d8d2dfa21ec3d8054?d=identicon&s=25 Stefan Gofferje (Guest)
on 2013-12-04 09:20
(Received via mailing list)
Attachment: smime.p7s (4 KB)
After some tinkering I am at this error message...:
Traceback (most recent call last):
  File "/home/sgofferj/top_block.py", line 75, in <module>
    tb = top_block()
  File "/home/sgofferj/top_block.py", line 46, in __init__
    self.top_layout.addWidget(self._qtgui_freq_sink_x_0_win)
  File "/usr/lib64/python2.7/site-packages/gnuradio/gr/top_block.py",
line 100, in __getattr__
    return getattr(self._tb, name)
AttributeError: 'top_block_sptr' object has no attribute 'top_layout'
5e623cc1b53ddefb15c9bad4245986a1?d=identicon&s=25 Johannes Demel (Guest)
on 2013-12-04 09:34
(Received via mailing list)
Hi Gofferje,

it might be trivial, but did you adjust the Generate Options? It should
be set to "QT GUI" instead of the default "WX GUI".

Johannes
B7282036e83c272d8d2dfa21ec3d8054?d=identicon&s=25 Stefan Gofferje (Guest)
on 2013-12-04 09:48
(Received via mailing list)
Attachment: smime.p7s (4 KB)
On 12/04/2013 10:33 AM, Johannes Demel wrote:
> it might be trivial, but did you adjust the Generate Options? It should
> be set to "QT GUI" instead of the default "WX GUI".

You are my hero! :D
Of course, I forgot that after hours of going through the installed
packages on my system and trying to figure out which ones might conflict
with GR :).

Thanks a lot.

-S
B7282036e83c272d8d2dfa21ec3d8054?d=identicon&s=25 Stefan Gofferje (Guest)
on 2013-12-04 10:51
(Received via mailing list)
Attachment: smime.p7s (4 KB)
Well, joy was short... I added a QT GUI range item and...

Traceback (most recent call last):
  File "/home/sgofferj/top_block.py", line 16, in <module>
    import PyQt4.Qwt5 as Qwt
ImportError: No module named Qwt5

libqwt5 *is* installed and there's no "qwt5" package in any repo I know
off...
C539637020fd56193dd6daec746c4a84?d=identicon&s=25 Tom Rondeau (Guest)
on 2013-12-04 15:51
(Received via mailing list)
On Wed, Dec 4, 2013 at 4:49 AM, Stefan Gofferje
<lists@home.gofferje.net> wrote:
> Well, joy was short... I added a QT GUI range item and...
>
> Traceback (most recent call last):
>   File "/home/sgofferj/top_block.py", line 16, in <module>
>     import PyQt4.Qwt5 as Qwt
> ImportError: No module named Qwt5
>
> libqwt5 *is* installed and there's no "qwt5" package in any repo I know
> off...


You must also have python-qwt5 (or PyQWT) installed to use these
widgets.

And to respond to the above comment from the OpenSUSE mailing list you
posted, this is /not/ reinventing the wheel. We are doing something
completely different with Qwt than what PyQwt does to make all of the
blocks work in C++. We make our own QWT widgets in C++ and then export
those. But we also use PyQWT for things that are naturally supported
there.

Plus, PyQWT has stopped development and has even stated that they will
not support QWT6, which is a shame and will eventually cause us and
anyone else trying to use PyQWT real issues in the future. I've been
looking for an alternative to it.

Tom
739a038d5a03d5448114b3615e2caedc?d=identicon&s=25 Activecat K. (activecat_k)
on 2014-05-05 12:21
(Received via mailing list)
Tom Rondeau-2 wrote
> Plus, PyQWT has stopped development and has even stated that they will
> not support QWT6, which is a shame and will eventually cause us and
> anyone else trying to use PyQWT real issues in the future. I've been
> looking for an alternative to it.

Will this affect gnuradio moving away from wxwidgets toward Qt ?



--
View this message in context:
http://gnuradio.4.n7.nabble.com/Python-chaos-tp450...
Sent from the GnuRadio mailing list archive at Nabble.com.
F18b7b61dfbfe46c7af3cbcbda568c4f?d=identicon&s=25 Vanush Vaswani (Guest)
on 2014-05-07 06:01
(Received via mailing list)
The lack of notice for Generate Options is a killer. Not to mention, if
using QT sinks with WX GUI set, a cryptic error message is the reuslt.
B4ffbc711addde4c649b1ed526df6157?d=identicon&s=25 Martin Braun (Guest)
on 2014-05-07 09:32
(Received via mailing list)
On 07.05.2014 05:59, Vanush Vaswani wrote:
> The lack of notice for Generate Options is a killer. Not to mention, if
> using QT sinks with WX GUI set, a cryptic error message is the reuslt.

We know, and we have this on our long todo list for GRC. We still don't
have an abundance of GRC devs, so don't bet on this being done next
week.

Martin
F18b7b61dfbfe46c7af3cbcbda568c4f?d=identicon&s=25 Vanush Vaswani (Guest)
on 2014-05-07 09:45
(Received via mailing list)
Tom,

Have you looked at PyQtGraph? I've had some success with it.

Vanush
C539637020fd56193dd6daec746c4a84?d=identicon&s=25 Tom Rondeau (Guest)
on 2014-05-07 15:31
(Received via mailing list)
On Wed, May 7, 2014 at 3:43 AM, Vanush Vaswani <vanush@gmail.com> wrote:

> Tom,
>
> Have you looked at PyQtGraph? I've had some success with it.
>
> Vanush
>

Thanks for the suggestion! Yes, I have looked at it. It looks like a
great
project for working directly in Python, but we mostly do all of our
plotting in QT C++ and export. The use of PyQWT is specifically to get
us
QWT widgets like the range, check boxes, radio buttons, etc. Pretty much
what you see under "GUI Tools -> QT" in the GRC block list. It doesn't
look
like PyQtGraph provides equivalents to those (or even anything that
would
effectively replace them).

Tom
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.