Post Go back to editing

PLUTO SDR TypeError: 'Context' object is not callable

RX LO 2000000000
Traceback (most recent call last):
  File "pluto.py", line 66, in <module>
    sdr.tx(iq)
  File "/usr/local/lib/python3.8/dist-packages/pyadi_iio-0.0.9-py3.8.egg/adi/rx_tx.py", line 396, in tx
  File "/usr/local/lib/python3.8/dist-packages/pyadi_iio-0.0.9-py3.8.egg/adi/rx_tx.py", line 331, in _tx_init_channels
  File "/usr/local/lib/python3.8/dist-packages/iio.py", line 1013, in __init__
    self._ctx = device.ctx()
TypeError: 'Context' object is not callable

Using Python3 on Ubuntu 20 LTS

Parents
  • There is a known issue with the python bindings from libiio.

    Can you try downgrading pylibiio first by running:

    sudo pip3 install pylibiio==0.21.0 --no-binary :all:

    -Travis

  • python 3.8.10 (default, Jun  2 2021, 10:49:15)
    [GCC 9.4.0] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import adi
    >>> sdr = adi.Pluto('ip:192.168.2.1') # or whatever your Pluto's IP is
    >>> sdr.sample_rate = int(2.5e6)
    >>> sdr.rx()
    ERROR: Open unlocked: -16
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/usr/local/lib/python3.8/dist-packages/pyadi_iio-0.0.9-py3.8.egg/adi/rx_tx.py", line 252, in rx
      File "/usr/local/lib/python3.8/dist-packages/pyadi_iio-0.0.9-py3.8.egg/adi/rx_tx.py", line 173, in __rx_complex
      File "/usr/local/lib/python3.8/dist-packages/pyadi_iio-0.0.9-py3.8.egg/adi/rx_tx.py", line 129, in _rx_init_channels
      File "/usr/local/lib/python3.8/dist-packages/iio.py", line 1010, in __init__
        self._buffer = _create_buffer(device._device, samples_count, cyclic)
      File "/usr/local/lib/python3.8/dist-packages/iio.py", line 64, in _check_null
        raise OSError(err, _strerror(err))
    OSError: [Errno 16] Device or resource busy

  • Do you have another application like IIO-Scope running alongside pyadi?

    -Travis

Reply Children