Something wrong when I tried to create a out-of-tree module

Hello all,

 My gnuradio worked fine before, but recently when I use the 

command:

                                 gr_modtool newmod howto

to create a out-of-tree module, error occurs and it says,

Traceback (most recent call last):
File “/usr/local/bin/gr_modtool”, line 26, in
from gnuradio.modtool import *
File
“/usr/local/lib/python2.7/dist-packages/gnuradio/modtool/init.py”,
line 30, in
from modtool_newmod import ModToolNewModule
File
“/usr/local/lib/python2.7/dist-packages/gnuradio/modtool/modtool_newmod.py”,
line 27, in
from gnuradio import gr
File “/usr/local/lib/python2.7/dist-packages/gnuradio/gr/init.py”,
line 41, in
from runtime_swig import *
File
“/usr/local/lib/python2.7/dist-packages/gnuradio/gr/runtime_swig.py”,
line 26, in
_runtime_swig = swig_import_helper()
File
“/usr/local/lib/python2.7/dist-packages/gnuradio/gr/runtime_swig.py”,
line 22, in swig_import_helper
_mod = imp.load_module(’_runtime_swig’, fp, pathname, description)
ImportError: dynamic module does not define init function
(init_runtime_swig)

 Same thing happens when I input "from gnuradio import gr" in python 

code. It never happens before. Moreover, when I reinstall

gnuradio, a module called gr-iqbal cannot be built…

  Does anybody have met such problem or have tackled it? Appreciate 

your help.

Yours,
Tianqi

On Tue, Aug 13, 2013 at 02:54:50PM +0000, PanTianqi wrote:

[…]
_mod = imp.load_module(’_runtime_swig’, fp, pathname, description)
ImportError: dynamic module does not define init function (init_runtime_swig)

 Same thing happens when I input "from gnuradio import gr" in python code. 

It never happens before. Moreover, when I reinstall

Your build is broken. I’ve seen this error before during development,
usually when somehow the SWIG components are outdated.
Try make clean and re-building.

MB


Karlsruhe Institute of Technology (KIT)
Communications Engineering Lab (CEL)

Dipl.-Ing. Martin B.
Research Associate

Kaiserstraße 12
Building 05.01
76131 Karlsruhe

Phone: +49 721 608-43790
Fax: +49 721 608-46071
www.cel.kit.edu

KIT – University of the State of Baden-Württemberg and
National Laboratory of the Helmholtz Association