ghostop14 / gr-correctiq

GNURadio blocks to remove that IQ DC spike just like some software and drivers do! Three techniques available: auto, auto-tune to dc offset, and manual.
GNU General Public License v3.0
82 stars 19 forks source link

Error when dragging block into schematic #1

Open markuskreitzer opened 7 years ago

markuskreitzer commented 7 years ago

I followed the install steps without issue.

When I drag the block into my schematic, gnuradio-companion quits with the following error:

Fatal Python error: PyThreadState_Get: no current thread
Abort trap: 6

Running gnuradio-companion on Mac OS X 10.12.3. I installed it with port.

Any help would be appreciated!

ghostop14 commented 7 years ago

Hi elec3647, sorry for the delay. I don't have a Mac to test it on so I can't reproduce the issue. A couple of things you can check is that the library actually got installed with the "make install". Also I've seen issues where if I didn't close GNURadio and run "sudo ldconfig" before re-opening it on the first install, it would fail on running. So maybe try those?

JamesTheHacker commented 7 years ago

How did you install on OSX. I'm using 10.10.5 and I followed the instructions. It's installed, I can see ...

-- Install configuration: "Release"
-- Up-to-date: /usr/local/lib/cmake/correctiq/correctiqConfig.cmake
-- Up-to-date: /usr/local/include/correctiq/api.h
-- Up-to-date: /usr/local/include/correctiq/correctiq.h
-- Up-to-date: /usr/local/include/correctiq/correctiq_auto.h
-- Up-to-date: /usr/local/include/correctiq/correctiq_man.h
-- Up-to-date: /usr/local/lib/libgnuradio-correctiq.1.0.0git.dylib
-- Up-to-date: /usr/local/lib/libgnuradio-correctiq.dylib

But there's no block showing up in gnuradio-companion. I've used CTRL+F to search for it. It's not there. I think gnuradio-companion expects it to be in /opt/local/share/gnuradio/grc/blocks on my system. But, the contents of /opt/local/share/gnuradio/grc/blocks contains:

correctiq_correctiq.xml
correctiq_correctiq_man.xml
correctiq_correctiq_auto.xml

I don't mean to hijack the thread but I can't find any information on this online at all.

@ghostop14 also there is no ldconfig command on OSX.

ghostop14 commented 7 years ago

Hi JamesTheHacker, no problem at all. I don't have a mac to test on but I'm happy to try to get you through it. If it's something fundamental to the install process for OSX I have a few other modules I'll work any fixes back into too.

So couple quick questions...

mgp25 commented 7 years ago

Hello @ghostop14,

im facing same issue, but maybe i found the reason why.

When i installed the block, .xml files were writen to /usr/local/share/gnuradio/grc/blocks/ instead of /opt/local/share/gnuradio/grc/blocks. (usr instead of opt).

The path GNU Radio is loading blocks from is /opt/local/share/gnuradio/grc/blocks:

<<< Welcome to GNU Radio Companion 3.7.11 >>>

Block paths:
    /Users/mgp25/.grc_gnuradio
    /opt/local/share/gnuradio/grc/blocks

So... i tried to copy these files to /opt/local/share/gnuradio/grc/blocks and it the blocks appeared correctly in GNU Radio blocks.

When i tried to run flowgraph:


Generating: '/Users/mgp25/Desktop/top_block.py'

Executing: /opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -u /Users/mgp25/Desktop/top_block.py

Traceback (most recent call last):
  File "/Users/mgp25/Desktop/top_block.py", line 31, in <module>
    import correctiq
ImportError: No module named correctiq

And maybe this issue happens because of the path thing i described above. What do you think @ghostop14 ?

ghostop14 commented 7 years ago

It definitely sounds like there's a mismatch between where your install process is putting the files and where gnuradio is looking for them. The importerror "no module named correctiq" sounds like it can't find where the install put the lib so it's probably not in your library path. Sometimes a "sudo ldconfig" after first install takes care of it. If that doesn't do the trick, I'd see where the install put the correctiq library and make sure it's in the path.

mgp25 commented 7 years ago

@ghostop14 the thing is ldconfig command doesn't exist in macOS. So far i found sudo update_dyld_shared_cache but it didn't work.

Install project log:

Install the project...
-- Install configuration: "Release"
-- Up-to-date: /usr/local/lib/cmake/correctiq/correctiqConfig.cmake
-- Up-to-date: /usr/local/include/correctiq/api.h
-- Up-to-date: /usr/local/include/correctiq/correctiq.h
-- Up-to-date: /usr/local/include/correctiq/correctiq_auto.h
-- Up-to-date: /usr/local/include/correctiq/correctiq_man.h
-- Up-to-date: /usr/local/lib/libgnuradio-correctiq.1.0.0git.dylib
-- Up-to-date: /usr/local/lib/libgnuradio-correctiq.dylib
-- Up-to-date: /usr/local/bin/test-correctiq
-- Up-to-date: /usr/local/lib/python2.7/site-packages/correctiq/_correctiq_swig.so
-- Up-to-date: /usr/local/lib/python2.7/site-packages/correctiq/correctiq_swig.py
-- Up-to-date: /usr/local/lib/python2.7/site-packages/correctiq/correctiq_swig.pyc
-- Up-to-date: /usr/local/lib/python2.7/site-packages/correctiq/correctiq_swig.pyo

So it is intalling in /usr/local/lib/python2.7/site-packages/.

Is that it? Or what should i look at? And where should i place the library once found?

ghostop14 commented 7 years ago

Hmmm, maybe this is the clue... "When i installed the block, .xml files were writen to /usr/local/share/gnuradio/grc/blocks/ instead of /opt/local/share/gnuradio/grc/blocks. (usr instead of opt)."

I'm a debian guy so you may need to translate this for OSX a bit, but when I was first developing OOT modules I was working from the apt repo version instead of from the pybombs version like I should have. Once I switched over to the pybombs version, the install process changed slightly (if this fixes it I'll update the README). If on debian I did a 'sudo make install' it would write it to the /usr/local/share location. Once I had the pybombs version set up, I could just do a 'make install' and it would correctly put it in my pybombs install path without the need for sudo. Sounds like it could be something similar?

mgp25 commented 6 years ago

Hello @ghostop14,

I have a very easy solution to that:

cmake -DCMAKE_INSTALL_PREFIX=/opt/local ../

After that, you can simply do make and make install and will work perfectly.

Regards

herbsims commented 6 years ago

I'm having the same problem and followed all the advice up above (several times) without success. Any suggestions?

Octobeeeer commented 6 years ago

Are you use the pentoo system? I'm having the same problem, I don't know the detail of the install step, any experience share would be appreciated!

JTSvejda commented 5 years ago

Hi, I have the same problem. I'm using Pentoo and followed the build instructions of this project. I then drop the CorrectIQ block into my flow graph and get the very same error "ImportError: No module named correctiq". Is there maybe now some solution?

ghostop14 commented 5 years ago

It sounds like wherever it got installed, the python implementation being used by GR isn't using that path. The easy way to check is from a command-line just run "python". Then type "from correctiq import correctiq". If it gets you the same error, I'd tackle it as a basic python module issue, not so much GR or correctiq. When you type "make install" watch the paths and see where it's installing the python modules, then make sure that directory is either in your default python path (which it should be), or you can try some things like this from the command-line before running python/gnuradio:
PYTHONPATH=$PYTHONPATH: export If that does the trick you can always add that to your .bashrc to make it more permanent. See if that helps.

JTSvejda commented 5 years ago

Hi, thanks for the response. I've tried it once again on a fresh Pentoo system and got the same error. I've saved the whole terminal output in a txt-tfile attached to this massage. Unfortunately I'm not very familiar with all the python paths and therefore have no idea where your program should be placed or linked. I hope the terminal output will help you understand the problem and if you need any further information please let me know. pentoo_term_correctiq.txt

ghostop14 commented 5 years ago

Hi JTSvejda, I did have a chance to look through the text file. probably not the cause but you may want to install doxygen. Looks like that wasnt found. Other than that, everything seems okay with the build/install process.

It definitely sounds like something is up with python in that it cant find the module. I've never built on Pentoo so I can only provide some general guidance I think. I did notice that it installed into /usr/local/lib64/python2.7/site-packages. Do you also have a /usr/local/lib/python2.7/site-packages? It's possible that for whatever reason the OS isn't looking in /usr/local/lib64/python2.7/site-packages for additional python modules.