Error related to -ImportError: and swig_import_helper()

hi all ,
i have write comedi block while running program i am getting error
Traceback (most recent call last):
File “/home/jagdish/top_block.py”, line 13, in
import comedi
File “/usr/local/lib/python2.6/dist-packages/comedi/init.py”, line
40,
in
from comedi_swig import *
File “/usr/local/lib/python2.6/dist-packages/comedi/comedi_swig.py”,
line
24, in
_comedi_swig = swig_import_helper()
File “/usr/local/lib/python2.6/dist-packages/comedi/comedi_swig.py”,
line
20, in swig_import_helper
_mod = imp.load_module(‘_comedi_swig’, fp, pathname, description)
ImportError: /usr/local/lib/libgnuradio-comedi-3.3.0.so.0: undefined
symbol:
comedi_open

thanks

View this message in context:
http://old.nabble.com/error-related-to--ImportError%3A-and-swig_import_helper()-tp32191854p32191854.html
Sent from the GnuRadio mailing list archive at Nabble.com.

On 08/03/2011 11:07 PM, patiljagdish154 wrote:

24, in
_comedi_swig = swig_import_helper()
File “/usr/local/lib/python2.6/dist-packages/comedi/comedi_swig.py”, line
20, in swig_import_helper
_mod = imp.load_module(‘_comedi_swig’, fp, pathname, description)
ImportError: /usr/local/lib/libgnuradio-comedi-3.3.0.so.0: undefined symbol:
comedi_open

Did you link with libcomedi? http://www.comedi.org/doc/r4857.html

I just did some work on gr-comedi because it did not compile with the
recent versions of comedi that come with ubuntu package manager. So I
have no idea how you built the library in the first place.

Anyway work is here:
http://gnuradio.org/redmine/projects/gnuradio/wiki/CMakeWork

-josh

thanks
i am getting about linking comedilib.
i think the above error is sort out.now i am getting
File “/home/jagdish/top_block.py”, line 36, in
tb = top_block()
File “/home/jagdish/top_block.py”, line 28, in init
self.comedi_source_s_0 = comedi.source_s( )
AttributeError: ‘module’ object has no attribute ‘source_s’

is this error due python path ?
i had installed 3 -4 block , i didn’t get such kind of error.
i using ubuntu 10.10 , python2.6
all modules(gr, howto ,etc…) that i had installed are stored in
/usr/local/lib/(*.so , *.la *3.3.0.so.o , *.3.3.0.so.0.0.0) and in
/usr/local/lib/python2.6/dist-packages/
to compile comedi code i C compiler i used
gcc filename.c -lcomedi -lm and in GNURadio it compile it like normally
gcc
filename.c.
is taht a problem ?

thanks
jagdish

Josh B.-2 wrote:

File “/usr/local/lib/python2.6/dist-packages/comedi/init.py”, line
_mod = imp.load_module(‘_comedi_swig’, fp, pathname, description)
have no idea how you built the library in the first place.


View this message in context:
http://old.nabble.com/error-related-to--ImportError%3A-and-swig_import_helper()-tp32191826p32199446.html
Sent from the GnuRadio mailing list archive at Nabble.com.