Python chaos

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
from gnuradio import qtgui
File “/usr/lib64/python2.7/site-packages/gnuradio/qtgui/init.py”,
line 34, in
from qtgui_swig import *
File
“/usr/lib64/python2.7/site-packages/gnuradio/qtgui/qtgui_swig.py”, line
26, in
_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

On Tue, Dec 3, 2013 at 4:52 AM, Stefan Gofferje
[email protected] 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

After some tinkering I am at this error message…:
Traceback (most recent call last):
File “/home/sgofferj/top_block.py”, line 75, in
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’

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

On 12/03/2013 04:50 PM, Tom R. 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

On 12/04/2013 10:33 AM, Johannes D. 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! :smiley:
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

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
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…

On Wed, Dec 4, 2013 at 4:49 AM, Stefan Gofferje
[email protected] 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
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

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.

On 07.05.2014 05:59, Vanush V. 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

Tom R.-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-tp45076p47953.html
Sent from the GnuRadio mailing list archive at Nabble.com.

Tom,

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

Vanush

On Wed, May 7, 2014 at 3:43 AM, Vanush V. [email protected] 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