Tuesday, March 5, 2024

uhd.find_devices() - AttributeError

Hello all,

I've been having some issues with gnuradio 3.10 and still haven't figured it out yet. I'd really appreciate it if anyone could help me or have any pointers that I can follow.

For your reference, I have an Ubuntu 22 virtual machine running on VMware and installed gnuradio (as well as other dependencies) from the instructions at https://wiki.gnuradio.org/index.php/InstallingGR (I tried both installation methods via apt and via ppa but no luck).

The error message I have is:

-----------------------------------------------------------------
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3/dist-packages/gnuradio/uhd/__init__.py", line 73, in find_devices
    return __builtins__['map'](to_pythonized_dev_addr, uhd_python.find_devices_raw(*args, **kwargs))
AttributeError: module 'gnuradio.uhd.uhd_python' has no attribute 'find_devices_raw'. Did you mean: 'find_devices'?
-----------------------------------------------------------------

Steps to reproduce:
1. Install gnuradio 3.10
2. From the command line, launch python3 by typing "python3"
    - >>> from gnuradio import uhd
    - >>> print(uhd.find_devices())
That's where the error occurs.

The content of '/usr/lib/python3/dist-packages/gnuradio/uhd/__init__.py' can also be found at https://github.com/gnuradio/gnuradio/blob/master/gr-uhd/python/uhd/__init__.py

Note that I don't have this issue with Ubuntu 20, which uses gruradio 3.8 and SWIG instead of PyBind11. So instead of 'uhd_python', it'll be 'uhd_swig' from the above error message. The code with gnuradio 3.8 can also be found at https://github.com/gnuradio/gnuradio/blob/maint-3.8/gr-uhd/python/uhd/__init__.py

Thank you all in advance!!
Trung Trieu

No comments:

Post a Comment