# Python errors running flowgraph - first attempt

**URL:** <https://www.ruby-forum.com/t/python-errors-running-flowgraph-first-attempt/234099>\
**Category:** GNU Radio\
**Created:** [February 5, 2015, 7:27pm UTC](https://www.ruby-forum.com/t/python-errors-running-flowgraph-first-attempt/234099 "2015-02-05T19:27:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![addis\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c4cdca/32.png) [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Post date:** [February 5, 2015, 7:27pm UTC](https://www.ruby-forum.com/t/python-errors-running-flowgraph-first-attempt/234099/1 "2015-02-05T19:27:29Z")

</div>

Newbie to gnuradio. After struggling for a couple weeks with build  
issues, I finally have a yocto-based build for an embedded x86\_64  
target. I’m trying to execute a flowgraph that I demonstrated  
successfully on Ubuntu 14. I copied the resulting .grc file from  
Ubuntu to the x86\_64 target. It is based directly from gnuradio  
tutorial, a broadcast FM receiver.

gnuradio-companion runs on my embedded x86\_64 target, but issues three  
XML parse errors on startup:

Preferences file: /home/root/.grc  
Block paths:  
/usr/share/gnuradio/grc/blocks  
/usr/local/share/gnuradio/grc/blocks  
/home/root/.grc\_gnuradio

XML parser: Found 3 erroneous XML files while loading the block tree

Displaying these errors from Help shows all three are similar with the  
text “Element \<block|param\>…does not follow DTD, expecting…”

Then gnuradio-companion starts up and displays my flowgraph.

When I try to ‘Run’ it, I get:

Showing: “/home/root/gr-tutorial-broadcast-fm-rx.grc”  
Generating: “/home/root/my\_gui.py”  
Executing: “/home/root/my\_gui.py”

Traceback (most recent call last):  
File “/home/root/my\_gui.py”, line 8, in   
from PyQt4 import Qt  
File “/usr/lib/python2.7/site-packages/PyQt4/Qt.py”, line 1  
from PyQt4.QtCore import \*\n

Looking at Qt.py, it contained 8 lines that looked like this:  
from PyQt4.QtCore import \*\n  
… \<repeated 7 more times with various modules\>  
SyntaxError: unexpected character after line continuation character

Once I “hacked” the ‘\n’ from these lines, and reran the flowgraph  
using ‘Run’, now I get this:

Traceback (most recent call last):  
File “/home/root/my\_gui.py”, line 8, in   
from PyQt4 import Qt  
File “/usr/lib/python2.7/site-packages/PyQt4/Qt.py”, line 2, in  
  
from PyQt4.QtDeclarative import \*

ImportError: /usr/lib/python2.7/site-packages/PyQt4/QtDeclarative.so:  
undefined symbol: \_ZTI16QDeclarativeView

This looks like some type of package mismatch? I’m not a python guy ☹

My yocto-based build configuration looks like this:  
meta-sdr: master  
meta-python: dizzy  
meta-oe: dizzy  
oe-core: dizzy

Any advice is appreciated on how to resolve this.

Regards,

Chris H.inan

–  
Life is like Linux - it never stands still.

---

<div class="post-metadata">

**Author:** ![Chris\_H.inan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/91b2a8/32.png) [@Chris\_H.inan](https://www.ruby-forum.com/u/Chris_H.inan)\
**Post date:** [February 6, 2015, 12:04pm UTC](https://www.ruby-forum.com/t/python-errors-running-flowgraph-first-attempt/234099/2 "2015-02-06T12:04:40Z")

</div>

On Thu, Feb 5, 2015 at 6:26 PM, Chris H.inan [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Preferences file: /home/root/.grc  
> Then gnuradio-companion starts up and displays my flowgraph.  
> File “/usr/lib/python2.7/site-packages/PyQt4/Qt.py”, line 1  
> from PyQt4.QtCore import \*\n
> 
> Looking at Qt.py, it contained 8 lines that looked like this:  
> from PyQt4.QtCore import \*\n  
> … \<repeated 7 more times with various modules\>  
> SyntaxError: unexpected character after line continuation character
> 
> Once I “hacked” the ‘\n’ from these lines, and reran the flowgraph

Hi Chris,

That looks like maybe it’s a problem between code editors adding or  
misinterpreting the line end character.

In general, though, we don’t recommend people actually run GRC on their  
embedded devices. You want to build and debug everything on a host. If  
using Python, you just copy over the resulting Python file to the device  
you want to run on. If it’s a C++ project, you’d cross-compile and then  
move the binary over. That would help with these issues, I think.

> This looks like some type of package mismatch? I’m not a python guy ☹

Yes, looks like a version mismatch. Possibly between PyQT and QT or  
something to do with QWT.

> Chris H.inan

I’ll have to let Philip B. comment on this. But using dizzy and  
meta-sdr’s master could be part of the problem. I’ve mostly stayed on  
daisy  
for the OE stuff, so I don’t have any knowledge of the version issues  
here.  
Though it’s probably time I move up to dizzy.

Tom
