unsynchronized / gr-mixalot

POCSAG, FLEX, and GSC encoder blocks for GNU Radio
GNU General Public License v3.0
139 stars 39 forks source link

error executing ./pocsagtx_hackrf.py #1

Open Jackovic opened 10 years ago

Jackovic commented 10 years ago

Hello,

I have a problem when : $ ./pocsagtx_hackrf.py Traceback (most recent call last): File "./pocsagtx_hackrf.py", line 19, in import mixalot File "/usr/local/lib/python2.7/dist-packages/mixalot/init.py", line 45, in from mixalot_swig import * ImportError: No module named mixalot_swig

What can I do to solve this issue ? ++

Jack

Jackovic commented 10 years ago

Sorry for the noise, after : $ sudo apt-get install swig all is fine. ++

Jack

unsynchronized commented 10 years ago

i should probably check for that in the build process. i assumed that the GR cmake stuff did, but GR has changed a lot since i first wrote this.. i need to revisit it soon (and add my code for GSC support).

thanks for the report anyway!

CCRRX commented 7 years ago

Hello,

i have a similar issue:

Traceback (most recent call last): File "/home/crx/gr-mixalot/grc/pocsagtx_hackrf.py", line 20, in import mixalot File "/usr/local/lib/python2.7/dist-packages/mixalot/init.py", line 45, in from mixalot_swig import * File "/usr/local/lib/python2.7/dist-packages/mixalot/mixalot_swig.py", line 21, in _mixalot_swig = swig_import_helper() File "/usr/local/lib/python2.7/dist-packages/mixalot/mixalot_swig.py", line 20, in swig_import_helper return importlib.import_module('_mixalot_swig') File "/usr/lib/python2.7/importlib/init.py", line 37, in import_module import(name) ImportError: No module named _mixalot_swig

swig is installed but I have no clue why _mixalot_swig cant be find.

Thank you for your help!

unsynchronized commented 7 years ago

Related issue here: https://github.com/unsynchronized/gr-mixalot/issues/18

Bottom line: this is happening because at the time that the GRC-generated script for a flowgraph is run, mixalot isn't in the python modules path. This is often because a 'make install' installed mixalot into /usr/local, and your python instance isn't looking for it there. The easiest route to a fix is often by setting $PYTHONPATH (e.g. to /usr/local/lib/python2.7/site-packages if that's where mixalot ended up on your system), but there are other ways too.

Can you give more details about your environment? How did you install GNU Radio, and what kind of OS is this?

CCRRX commented 7 years ago

Hello,

thank you for answering! I'll try it lather.

My system is a Debian 9.0, GNU Radio is installed by a simple apt-get.

unsynchronized commented 7 years ago

Cool. In that case, I bet the problem is that python isn't looking in /usr/local. If you get missing-library crashes after that, you may also need to add /usr/local/lib to LD_LIBRARY_PATH (since the mixalot C++ code will likely end up there)

Fuddler commented 7 years ago

Hi, i also have exactly the same Problem! I do not understand how to fix it! Can someone please help me?