Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attribute error #4

Open
sunshuai1989 opened this issue Aug 28, 2017 · 6 comments
Open

Attribute error #4

sunshuai1989 opened this issue Aug 28, 2017 · 6 comments

Comments

@sunshuai1989
Copy link

I followed the basic step but it gives me the following error:

File "/home/shuai/gnuRadioLearn/replayRSSI.py", line 156, in init
self.correctiq_correctiq_0 = correctiq.correctiq()
AttributeError: 'module' object has no attribute 'correctiq'

@ghostop14
Copy link
Owner

Sounds like something must have gone wrong for you in the make / install process and possibly the XML's got installed but the swig wrappers or something didn't build. Hence the no attribute warning.

@wohldad
Copy link

wohldad commented Jul 15, 2018

Similar issue here: daniestevez/gr-outernet#1

I had this exact issue and fixed it. CMAKE doesn't exit when it can't find the SWIG version.

Fixed in Unbuntu by installing:
sudo apt-get install swig

@mariobaldini
Copy link

I am having the same problem and even in a fresh attempt, confirming that cmake did find SWIG, the error persists.

-- Checking for module SWIG
-- Found SWIG version 3.0.12.
-- Found SWIG: /usr/bin/swig  
Executing: /usr/bin/python2 -u /home/mario/code/top_block.py

Traceback (most recent call last):
  File "/home/mario/code/top_block.py", line 111, in <module>
    main()
  File "/home/mario/code/top_block.py", line 99, in main
    tb = top_block_cls()
  File "/home/mario/code/top_block.py", line 67, in __init__
    self.correctiq_correctiq_0 = correctiq.correctiq()
AttributeError: 'module' object has no attribute 'correctiq'

>>> Done (return code 1)

Environment: Fedora 30 x64
GNU Radio Companion 3.7.13.5
gr-correctiq: commit 98d03df

Module folder contents:

mario@latitude /usr/lib64/python2.7/site-packages/correctiq $ sha1sum *
e48d661f2e0b1e822825cb0aaa92d66a7d501b24  correctiq_swig.py
e250c315b9b2c35bb43caa1e64b7ec853a6f7e65  correctiq_swig.pyc
e250c315b9b2c35bb43caa1e64b7ec853a6f7e65  correctiq_swig.pyo
399ae9674c804695843e44ee42e24a898dce9075  _correctiq_swig.so
9b10592d76d06c500da77fe2c4ebdfc7cca3f477  __init__.py
e34d100ef6a08481920b2948489af672865e84cd  __init__.pyc
e34d100ef6a08481920b2948489af672865e84cd  __init__.pyo
mario@latitude /usr/lib64/python2.7/site-packages/correctiq $ 

Any ideas what I could try to fix it?

Thank you all

@scrappylabs
Copy link

Try sudo ldconfig

@Kryptoxslx
Copy link

Kryptoxslx commented Feb 25, 2020

I got the same error

File "/home/sl/test.py", line 168, in __init__ self.correctiq_correctiq_0 = correctiq.correctiq() AttributeError: module 'correctiq' has no attribute 'correctiq'

i have swig 4.0 installed.

@ghostop14
Copy link
Owner

Hi folks, there's another trick to dump a ton of error info that'll let you know if there was some type of link error. Give this a shot from the command-line:

export LD_DEBUG=libs
python3
import correctiq

If something's missing or not found it'll most likely show up in the debug output during the import call.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants