Monday, February 20, 2012

Re: [Discuss-gnuradio] [Patch-gnuradio] Bug in GRC, bugs in grc-examples and unit tests [Was: GRC: Just compile XML, no GUI]

On 02/20/2012 12:39 AM, Martin Braun wrote:
> On Sun, Feb 19, 2012 at 04:07:37PM -0500, A. Maitland Bottoms wrote:
>>> 724a3ff8798d
>> ...
>>> It also has a workaround for a bug
>>> (http://gnuradio.org/redmine/issues/485) in GRC. Probably should have
>>> been two commits.
>>
>> The horrible, ugly fix for gnuradio-companion is prone to throwing KeyError
>> on the
>> if os.environ['GR_DONT_LOAD_PREFS']:
>> line.
>>
>> I had better luck changing that one to
>> if os.environ.get('GR_DONT_LOAD_PREFS'):
>
> Good point. Well, I did mention it's ugly :) But I should have seen that
> myself, thanks for mentioning. I pushed that just in case someone has a
> look at my branch.
>

For what its worth, it is ok to have GR_DONT_LOAD_PREFS. You just have
to also set the GRC_BLOCKS_PATH:

export GRC_BLOCKS_PATH=/usr/local/share/gnuradio/grc/blocks
#now the following command should work fine
GR_DONT_LOAD_PREFS=1 gnuradio-companion

Further, if its of benefit, the blocks path could be determined from the
__file__ attribute in python, assuming a standard installation
structure. Just search up in the directory structure until you see a
"share/gnuradio"

-Josh

_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

No comments:

Post a Comment