Problem with installation - grc does not start

Hi,

I’ve installed gnuradio following this guide:
http://www.mail-archive.com/[email protected]/msg26238.html

While installing everything was fine and I had no error messages.
After the installation I tried to start grc and got the error messages
posted below.

In GNU radio 3.2.1 problem in GRC - GNU Radio - Ruby-Forum the following work-around
was descried:

Johnathan C. wrote:

It looks like we’re having some sort of problem with the GNU Radio
prefs system. We’ve at least established that you can get this
working by copying the /etc/gnuradio/conf.d/grc.conf contents into
your local ~/.gnuradio/config.conf:

$ touch ~/.gnuradio/config.conf
$ cat /etc/gnuradio/conf.d/grc.conf >> ~/.gnuradio/config.conf

Johnathan

Unfortunately this doesn’t work because I have no /etc/gnuradio/ . Is
this folder normally created automatically when you install gnuradio?

Can anybody help me?

OS: Kubuntu 10.04
gnuradio from git, branch next.

Thanks,
Thorsten

Error messages:

gnuradio@nb-gnuradio:~/gnuradio-uhd/gnuradio$ grc
<<< Welcome to GNU Radio Companion 3.2.2 >>>
Error: ‘options’

Failue
Traceback (most recent call last):
File
“/usr/lib/python2.6/dist-packages/gnuradio/grc/gui/MainWindow.py”,
line 174, in new_page
flow_graph = self._platform.get_new_flow_graph()
File “/usr/lib/python2.6/dist-packages/gnuradio/grc/base/Platform.py”,
line 149, in get_new_flow_graph
def get_new_flow_graph(self): return self.FlowGraph(self)
File “”, line 4, in init
File
“/usr/lib/python2.6/dist-packages/gnuradio/grc/base/FlowGraph.py”,
line 37, in init
self.import_data()
File
“/usr/lib/python2.6/dist-packages/gnuradio/grc/base/FlowGraph.py”,
line 192, in import_data
self._options_block = self.get_parent().get_new_block(self,
‘options’)
File “/usr/lib/python2.6/dist-packages/gnuradio/grc/base/Platform.py”,
line 159, in get_new_block
def get_new_block(self, flow_graph, key): return
self.Block(flow_graph, n=self._blocks_n[key])
File “/usr/lib/python2.6/dist-packages/gnuradio/grc/base/odict.py”,
line 34, in getitem
return self._data[key]
KeyError: ‘options’
Error: ‘options’
Failue
Traceback (most recent call last):
File
“/usr/lib/python2.6/dist-packages/gnuradio/grc/gui/MainWindow.py”,
line 174, in new_page
flow_graph = self._platform.get_new_flow_graph()
File “/usr/lib/python2.6/dist-packages/gnuradio/grc/base/Platform.py”,
line 149, in get_new_flow_graph
def get_new_flow_graph(self): return self.FlowGraph(self)
File “”, line 4, in init
File
“/usr/lib/python2.6/dist-packages/gnuradio/grc/base/FlowGraph.py”,
line 37, in init
self.import_data()
File
“/usr/lib/python2.6/dist-packages/gnuradio/grc/base/FlowGraph.py”,
line 192, in import_data
self._options_block = self.get_parent().get_new_block(self,
‘options’)
File “/usr/lib/python2.6/dist-packages/gnuradio/grc/base/Platform.py”,
line 159, in get_new_block
def get_new_block(self, flow_graph, key): return
self.Block(flow_graph, n=self._blocks_n[key])
File “/usr/lib/python2.6/dist-packages/gnuradio/grc/base/odict.py”,
line 34, in getitem
return self._data[key]
KeyError: ‘options’
Traceback (most recent call last):
File “/usr/bin/grc”, line 53, in
ActionHandler(args, Platform())
File
“/usr/lib/python2.6/dist-packages/gnuradio/grc/gui/ActionHandler.py”,
line 70, in init
self.handle_states(Actions.APPLICATION_INITIALIZE)
File
“/usr/lib/python2.6/dist-packages/gnuradio/grc/gui/ActionHandler.py”,
line 332, in handle_states
Actions.get_action_from_name(Actions.ELEMENT_DELETE).set_sensitive(bool(self.get_flow_graph().get_selected_elements()))
File
“/usr/lib/python2.6/dist-packages/gnuradio/grc/gui/MainWindow.py”,
line 281, in get_flow_graph
return self.get_page().get_flow_graph()
AttributeError: ‘NoneType’ object has no attribute ‘get_flow_graph’

The default behavior is to install the blocks to
/share/gnuradio/grc/blocks/ GRC knows to look in that path, so
you must have done something strange to your gnuradio installation.

If you know where you installed the xml block files. You can set the
path in the following two ways (copied from the wiki):

Method 2: Configuration File

Create or edit ~/.gnuradio/config.conf and add the following lines:

[grc]
local_blocks_path=/path/to/my/blocks

The local_blocks_path can contain multiple paths separated by colons:
local_blocks_path=/path/to/blocks1:/path/to/blocks2

Method 3: Environment Variable

Set the GRC_BLOCKS_PATH environment variable to a path that contains
your custom block wrapper. The GRC_BLOCKS_PATH can contain multiple
paths separated by colons:
GRC_BLOCKS_PATH=/path/to/blocks1:/path/to/blocks2

-josh

2010/9/21 Josh B. [email protected]:

Create or edit ~/.gnuradio/config.conf and add the following lines:

[grc]
local_blocks_path=/path/to/my/blocks

The local_blocks_path can contain multiple paths separated by colons:
local_blocks_path=/path/to/blocks1:/path/to/blocks2

Thanks for your answer. I edited config.conf to:

[grc]
local_blocks_path=/home/gnuradio/gnuradio-uhd/gnuradio/grc/blocks:/home/gnuradio/gnuradio-uhd/gnuradio/gr-uhd/grc

Now I can start grc and see the uhd blocks. The next problem is, that
I can’t execute any flow graphs out of grc, even if I run sudo grc I
get:

Executing: “/home/gnuradio/top_block.py”
[Errno 13] Permission denied

My workaround was to execute the flowgraph from shell which works as
long as I have no uhd blocks in my graph. With uhd blocks I get:

gnuradio@nb-gnuradio:~$ ./top_block.py
Traceback (most recent call last):
File “./top_block.py”, line 10, in
from gnuradio import uhd
ImportError: cannot import name uhd

What can I do to solve this problem?

Thorsten

[Errno 13] Permission denied

thats weird, what are the permissions on top_block.py?

My workaround was to execute the flowgraph from shell which works as
long as I have no uhd blocks in my graph. With uhd blocks I get:

gnuradio@nb-gnuradio:~$ ./top_block.py
Traceback (most recent call last):
File “./top_block.py”, line 10, in
from gnuradio import uhd
ImportError: cannot import name uhd

What can I do to solve this problem?

When I install my gnuradio/uhd stuff into a non-standard prefix, I setup
the paths in .bashrc like so:

derp_prefix=/home/jblum/usr
export PKG_CONFIG_PATH=${derp_prefix}/lib/pkgconfig:${PKG_CONFIG_PATH}
export PATH=${derp_prefix}/bin:$PATH
export PYTHONPATH=${derp_prefix}/lib64/python2.6/site-packages:$PYTHONPATH
export GRC_BLOCKS_PATH=${derp_prefix}/share/gnuradio/grc/blocks
export LD_LIBRARY_PATH=${derp_prefix}/lib

Hope that helps,
-Josh