I working under Ubntu 18.04 and finally discovered that the issue was related to the existence of 2 locations for my python3 dist-packages:

  • /usr/local/lib/python3.6/dist-packages/gnuradio/gr
  • /usr/local/lib/python3/dist-packages/gnuradio/gr (the latest build)

whilst my python sys.path was using the older build /usr/local/lib/python3.6/dist-packages/gnuradio/gr

I don't undestand how I get this situation (does this results from multiple builds on different version of GNURadio?)

The only non elegant way I was able to solve this was using a PYTHONPATH environment variable (export PYTHONPATH='/usr/local/lib/python3/dist-packages')

Regards, Christophe


On 06/01/2020 22:50, Christophe Seguinot wrote:

Hi

I'm finalizing an in tree QTGUI eye_sink block. I use a GRC example which was working fine until I decided to upgrade my local GNURadiorepro (GnuRadio and Volk upgraded to latest commit on January 5 2020, I was previously using 3.9 master uploaded in November 2019 ).

  • My eye_sink module is functional, however when using a "channel model" I'm getting a python issue (I tested 2 different channels with similar issue).
  • Trying importing channels under python3 (from gnuradio import channels) gives the same issue.

May be this can be related to this commit ... but I did not succeeded in solving the issue.

Regards, Christophe

=============== error messages obtained under GRC ====================

Generating: '/home/seguinot/sdr_stuff/gnuradio-dev/gnuradio/gr-qtgui/examples/pyqt_eye_sink.py'

Executing: /usr/bin/python3 -u /home/seguinot/sdr_stuff/gnuradio-dev/gnuradio/gr-qtgui/examples/pyqt_eye_sink.py

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/gnuradio/channels/channels_swig.py", line 14, in swig_import_helper
    return importlib.import_module(mname)
  File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 658, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 571, in module_from_spec
  File "<frozen importlib._bootstrap_external>", line 922, in create_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
ImportError: /usr/local/lib/python3.6/dist-packages/gnuradio/channels/_channels_swig.so: undefined symbol: _ZN2gr8channels23selective_fading_model24makeEjfbfiSt6vectorIfSaIfEES4_S4_S4_i

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/gnuradio/channels/__init__.py", line 31, in <module>
    from .channels_swig import *
  File "/usr/local/lib/python3.6/dist-packages/gnuradio/channels/channels_swig.py", line 17, in <module>
    _channels_swig = swig_import_helper()
  File "/usr/local/lib/python3.6/dist-packages/gnuradio/channels/channels_swig.py", line 16, in swig_import_helper
    return importlib.import_module('_channels_swig')
  File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
ModuleNotFoundError: No module named '_channels_swig'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/gnuradio/channels/channels_swig.py", line 14, in swig_import_helper
    return importlib.import_module(mname)
  File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 658, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 571, in module_from_spec
  File "<frozen importlib._bootstrap_external>", line 922, in create_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
ImportError: /usr/local/lib/python3.6/dist-packages/gnuradio/channels/_channels_swig.so: undefined symbol: _ZN2gr8channels23selective_fading_model24makeEjfbfiSt6vectorIfSaIfEES4_S4_S4_i

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/seguinot/sdr_stuff/gnuradio-dev/gnuradio/gr-qtgui/examples/pyqt_eye_sink.py", line 29, in <module>
    from gnuradio import channels
  File "/usr/local/lib/python3.6/dist-packages/gnuradio/channels/__init__.py", line 35, in <module>
    from .channels_swig import *
  File "/usr/local/lib/python3.6/dist-packages/gnuradio/channels/channels_swig.py", line 17, in <module>
    _channels_swig = swig_import_helper()
  File "/usr/local/lib/python3.6/dist-packages/gnuradio/channels/channels_swig.py", line 16, in swig_import_helper
    return importlib.import_module('_channels_swig')
  File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
ModuleNotFoundError: No module named '_channels_swig'

>>> Done (return code 1)

Reply via email to