I found the answer to this post in the discuss-gnuradio archive.
The answer was posted by Patrick Sathyanathan:
[Discuss-gnuradio]
OOT Module Attribute Error module object has no attribute
'blockname'
The problem I had was exactly as Patrick describs, as was the
solution.
I'd recommend putting this information on the new Wiki!
Dan Martin
On 3/19/17 10:11 PM, Daniel P. Martin
wrote:
I periodically run into problems with the Python/SWIG portion
of my out-of-tree module builds. Wrapper modules are built by
swig but appear empty.
I'm running Ubuntu 16.04.
The error I get when I try to run a typical flowgraph that uses
my "abc_module" from GRC is
--------
Using Volk machine: avx2_64_mmx_orc
[...]
AttributeError: 'module' object has no attribute
'periodic_burst_source'
-------
SWIG appears to run and generate the wrapper files during the
make, but the wrapper files don't have the interface. I thought
I'd fixed this by reinstalling GNU radio, but now a module that
once built properly is failing as above. I can run python and
"import abc_module" but "Dir(abc_module)" shows it to be empty.
There are multiple SWIG distribution/versions available. At one
point I thought switching to SWIG 3.0 fixed this issue but the
last time it cropped up switching to 3.0 had no effect.
Also, the "make install" installing wrappers in
/usr/local/lib/python2.7/dist-packages, though on another machine
I have it has installed wrappers in
/usr/lib/python2.7/dist-packages.
Does anyone have tips or advice on debugging these issues?
Thanks,
Dan
--
Dr. Daniel Martin
Acadia Controls, LLC
110 Gateway Commons Dr
Gorham, ME
207 838-6465 mobile
207 839-6303 fax, office
www.acadiacontrols.com