discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] 'module' object has no attribute


From: Andrej Rode
Subject: Re: [Discuss-gnuradio] 'module' object has no attribute
Date: Mon, 17 Dec 2018 15:38:35 +0100
User-agent: Mutt/1.10.1 (2018-07-13)

Hi Guy, 
> ---
> AttributeError: 'module' object has no attribute 'mac'
> ---

That usually happens if python can't import the created module. 
It can have several reasons why it can't:
 1. the installed module is not in your (custom) PYTHONPATH
 2. The python module tries to import the C++ code wrapped with SWIG and
 errors out (Usually because some linking problems)

That's the two usual suspects if working with GNU Radio. You should
check the directory you installed the python module in. E.g.
`/usr/local/lib64/python2.7/site-packages` if there is a `mac` folder. 
If there is you should check if it is in your pythonpath (e.g. python -c
'import sys;print(sys.path);'). If it is you can go into the `mac`
folder and check with `ldd _mac_swig.so` (or similar) if the dynamic
linker can locate all libraries required to run the code.

Cheers
Andrej

-- 
Andrej Rode
GPG Key: 750B CBBB 4A75 811A 4D5F 03ED 5C23 7FB8 9A7D A2AA

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]