Post Go back to editing

plutosdr gnuradio - AttributeError: module 'iio' has no attribute 'pluto_source'

I have a plutosdr that I have been using successfully via pysdr.  I'm not attempting to use the device with gnuradio.

I followed the official guide https://wiki.analog.com/resources/tools-software/linux-software/gnuradio and gnuradio is starting ok.  I can create my plutosdr source with a basic QT GUI sink.  Although when I try to run it I get the following error.  

"AttributeError: module 'iio' has no attribute 'pluto_source'"

 Googling I found some references to name space conflicts of the pylibiio and gr-iio.  I uninstalled pylibiio and then reinstall gr-iio but I'm still running into the same issue.  I would appreciate any additional guidance to resolve this problem.

  • Actually not that I tried to resolve this I can't use pysdr anymore.  Even after adding back pylibiio. 

    File "/usr/lib/python3.8/site-packages/iio.py", line 1016, in __init__
    self._ctx = device.ctx()
    TypeError: 'Context' object is not callable

  • If you want to use gnuradio and pyadi-iio together you need to use gnuradio 3.10+ or rename the iio.py module.

    "AttributeError: module 'iio' has no attribute 'pluto_source'"

    This means that either:

    - gr-iio's swig bindings are not your python path (when installing gr-iio's OOT aka running the make install command it will tell you where all the components get installed)

    - Or pylibiio is clobbering gr-iio. I would just uninstall it.

    File "/usr/lib/python3.8/site-packages/iio.py", line 1016, in __init__
    self._ctx = device.ctx()
    TypeError: 'Context' object is not callable

    Please make you are using the latest release of pyadi-iio and pylibiio:

    - pip install -U pylibiio

    - pip install -U pyadi-iio

    -Travis