Question about gnuradio-companion

I just did a fresh install of gnuradio per the following:

http://gnuradio.org/redmine/projects/gnuradio/wiki/InstallingGR#Using-the-build-gnuradio-script

It was done on a fresh wipe and install of Kubuntu 13.04 - in fact it
was the first thing I installed after I installed the operating system.

I’m trying to run a script I generated on another system to stream data
from a USRP-N210. I can provide the .GRC file and the generated python
if needed, but there are only three main blocks… the USRP source, a
“head” block to stop the simulation after collecting all the data I
want, and a file sink. The script worked fine on the Windows-based
machine I was using.

Gnuradio-companion can generate the python file, but when I execute it,
I get the following:

Generating: “home/developer/Documents/gnuradio/top_block.py”

Executing: “home/developer/Documents/gnuradio/top_block.py”
[Errno 2] No such file or directory

Done

OK, so just out of curiosity, I brought up a command line to see if I
could execute the python script from there. And I can. So the issue is
not the generation of the script - it is something in GRC. As far as I
know I’ve set the PYTHONPATH and PKG_CONFIG_PATH environment variables
correctly.

I have tried creating a couple of other simple flowgraphs, and they seem
to work. But this one doesn’t. Even if I recreate it from scratch (so
as to avoid any issues that might have happened from using Windows
initially) I get the same error.

I’d appreciate any help you can provide.

Thanks,
Scott Bennett
Johns Hopkins University - Applied Physics Lab

On Mon, May 6, 2013 at 6:45 AM, Bennett, David S. (Scott)
[email protected] wrote:

Gnuradio-companion can generate the python file, but when I execute it, I
[Errno 2] No such file or directory

Thanks,
Scott Bennett

Scott,

Are you using relative path names for the file sink?

Tom

Scott,

Are you using relative path names for the file sink?

Tom

Tom,

Thanks for the note. Hopefully my “netiquette” is appropriate here.
It’s been an awfully long time since I’ve posed in a mailing list.

Per your question referenced above, the path name I have in the dialog
box is “/home/developer/Documents/gnuradio/record.dat”

If I understand my Linux right, this is an absolute path from root. And
it is the same path as listed in the python script generated by gnuradio
companion. I have tried executing gnuradio companion from the terminal
while in this working directory ("/home/developer/Documents/gnuradio),
but I get the same error. I have also set this as my working directory
in my gnuradio.desktop application shortcut with the same results.

Thanks,
Scott

On Mon, May 6, 2013 at 9:18 AM, Bennett, David S. (Scott)
[email protected] wrote:

Per your question referenced above, the path name I have in the dialog box is
“/home/developer/Documents/gnuradio/record.dat”

If I understand my Linux right, this is an absolute path from root. And it is
the same path as listed in the python script generated by gnuradio companion. I
have tried executing gnuradio companion from the terminal while in this working
directory ("/home/developer/Documents/gnuradio), but I get the same error. I have
also set this as my working directory in my gnuradio.desktop application shortcut
with the same results.

Thanks,
Scott

Yes, you’re using the absolute path. I was just checking to see if you
might have been trying to create a file in a write-protected directory
or a place that didn’t actually exist, which could have been a result
of using a relative path and having GRC point to a place you weren’t
expecting.

But with this info, I’m not sure. That’s not an error that GNU Radio
is producing; it’s the OS. If you replace the file sink with something
else (like a null sink), do you get the same error? I’m just checking
here to see if it’s a problem with the file you are trying to open or
maybe complaining about something else.

Tom

On Mon, May 6, 2013 at 10:34 AM, Bennett, David S. (Scott)
[email protected] wrote:

something else.
Scott
You shouldn’t have to work around this, though. Sounds like something
small but funky going on in your system. But to your other question,
no, there’s nothing wrong with using a GUI option with no GUI
components. It’ll just pop up a small dialog box somewhere, though,
and that could be annoying. May also be a problem if trying to
remotely log in and run the app.

Tom

something else.

Tom

I just replaced the file sync with a null sync, and I still get that
error in gnuradio companion. But as before if I execute the python
script companion generates, it executes fine. So I’m not sure what’s
going on.

In doing some additional troubleshooting over the last few minutes,
though, I hooked up a WX GUI FFT sync just to see if I could see
something in the band I was looking at. I had forgotten that I set the
“generate options” to “No GUI” since I wasn’t using a GUI. So it didn’t
execute properly. Curiously, when I changed that option to WX GUI, and
the FFT then worked, I went back and replaced it with the null sync, and
now strangely it works. And now the file sink works as well. So there
must be something in the generate options that behaves differently in
companion than in python.

This seems to be an adequate workaround. Is there anything inherently
wrong with setting GUI options when you’re not using a GUI?

Thanks,
Scott