[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] ImportError: No module named _osmosdr_swig
From: |
Fernando |
Subject: |
Re: [Discuss-gnuradio] ImportError: No module named _osmosdr_swig |
Date: |
Fri, 19 May 2017 10:55:01 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 |
After a lot of research guided by Michel Dickens, we found out the solution
The symptom: GRC crashes when placing osmosdr source and osmosdr sink
in a diagram on Opensuse Leap 42.2. Both gnuradio and gr_osmosdr
installed from hamradio repository, but I had tried other repositories
also with same error.
We find the error was generated by
address@hidden:~> python -c 'import osmosdr'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib64/python2.7/site-packages/osmosdr/__init__.py", line
26, in <module>
from osmosdr_swig import *
File "/usr/lib64/python2.7/site-packages/osmosdr/osmosdr_swig.py",
line 21, in <module>
_osmosdr_swig = swig_import_helper()
File "/usr/lib64/python2.7/site-packages/osmosdr/osmosdr_swig.py",
line 20, in swig_import_helper
return importlib.import_module('_osmosdr_swig')
File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in
import_module
__import__(name)
ImportError: No module named _osmosdr_swig
address@hidden:~>
I replaced file
"/usr/lib64/python2.7/site-packages/osmosdr/osmosdr_swig.py" with the
one attached and got different error:
address@hidden:~> python -c 'import osmosdr'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib64/python2.7/site-packages/osmosdr/__init__.py", line
26, in <module>
from osmosdr_swig import *
File "/usr/lib64/python2.7/site-packages/osmosdr/osmosdr_swig.py",
line 14, in <module>
_osmosdr_swig = swig_import_helper()
File "/usr/lib64/python2.7/site-packages/osmosdr/osmosdr_swig.py",
line 13, in swig_import_helper
return importlib.import_module(mname)
File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in
import_module
__import__(name)
ImportError: /usr/lib64/libairspy.so.0: undefined symbol:
libusb_handle_events_timeout_completed
address@hidden:~>
So it was a problem generated by libusb. I made a cleanup of libusb 32
bits libraries but problem remained.
Then we found the error was generated by /usr/local/lib/libusb-1.0.so.0
andromeda:~ # /bin/ls -lAF /usr/local/lib/libusb-1.0.so.0
lrwxrwxrwx 1 root root 17 Feb 4 2016 /usr/local/lib/libusb-1.0.so.0 ->
libmchpusb-1.0.so*
andromeda:~ # nm -a /usr/local/lib/libusb-1.0.so.0 | grep timeout
0000000000005500 t arm_timerfd_for_next_timeout
0000000000005260 t get_next_timeout
00000000000054a0 t handle_timeouts
0000000000005380 t handle_timeouts_locked
0000000000005090 T libusb_get_next_timeout
0000000000005e70 T libusb_handle_events_timeout
0000000000004c60 T libusb_pollfds_handle_timeouts
andromeda:~ #
I found that /usr/local/lib/libmchpusb-1.0.so wasn't in the rpm
database, so it seems not to be used by any package, so I tried to
remove the soft link
andromeda:/home/fernando # rm /usr/local/lib/libusb-1.0.so.0
andromeda:/home/fernando # /bin/ls -lAF /usr/local/lib/libusb-1.0.so.0
/bin/ls: cannot access '/usr/local/lib/libusb-1.0.so.0': No such file or
directory
andromeda:/home/fernando # ldconfig
andromeda:/home/fernando # /bin/ls -lAF /usr/local/lib/libusb-1.0.so.0
lrwxrwxrwx 1 root root 17 May 16 00:22 /usr/local/lib/libusb-1.0.so.0 ->
libmchpusb-1.0.so*
andromeda:/home/fernando #
I delete the soft link but when running ldconfig it appears again
I found who installed /usr/local/lib/libusb-1.0.so.0 ->libmchpusb-1.0.so*
I was michochip mplabx and it is reported the error with ldconfig
http://www.microchip.com/forums/m729021.aspx
https://groups.google.com/forum/#!msg/linrad/HVjwG36Kl9c/37hTBl1IIX0J
So I deleted ALL microchip software (I had a lot of old microchip
software, with more than one version of the same programs: xc8, xc16,
mplabx, etc.) and we solve the problem.
I installed the new versions of microchip programs and the problem did
not appear again.
thanks Michael.
osmosdr_swig.py
Description: Text Data
- [Discuss-gnuradio] ImportError: No module named _osmosdr_swig, Fernando, 2017/05/08
- Re: [Discuss-gnuradio] ImportError: No module named _osmosdr_swig, Cinaed Simson, 2017/05/09
- Re: [Discuss-gnuradio] ImportError: No module named _osmosdr_swig, Fernando, 2017/05/09
- Re: [Discuss-gnuradio] ImportError: No module named _osmosdr_swig, Cinaed Simson, 2017/05/09
- Re: [Discuss-gnuradio] ImportError: No module named _osmosdr_swig, Fernando, 2017/05/10
- Re: [Discuss-gnuradio] ImportError: No module named _osmosdr_swig, Cinaed Simson, 2017/05/10
- Re: [Discuss-gnuradio] ImportError: No module named _osmosdr_swig, Fernando, 2017/05/10
- Re: [Discuss-gnuradio] ImportError: No module named _osmosdr_swig, Bastian Bloessl, 2017/05/11
Re: [Discuss-gnuradio] ImportError: No module named _osmosdr_swig, Michael Dickens, 2017/05/09
- Re: [Discuss-gnuradio] ImportError: No module named _osmosdr_swig,
Fernando <=