Leaving this here for future reference and search engine indexing:
I got this error yesterday while building gr-satnogs:
[ 70%] Generating satnogs_swig.pyo
Traceback (most recent call last):
File “/usr/lib/python2.7/site.py”, line 68, in
File “/usr/lib/python2.7/os.py”, line 717, in
import copy_reg as _copy_reg
ValueError: bad marshal data (string ref out of range)
swig/CMakeFiles/pygen_swig_72e05.dir/build.make:65: recipe for target ‘swig/satnogs_swig.pyo’ failed
make: *** [swig/satnogs_swig.pyo] Error 1
CMakeFiles/Makefile2:273: recipe for target ‘swig/CMakeFiles/pygen_swig_72e05.dir/all’ failed
make: *** [swig/CMakeFiles/pygen_swig_72e05.dir/all] Error 2
Makefile:138: recipe for target ‘all’ failed
make: *** [all] Error 2
Suggested things for this kind of error is to remove pyc files and/or re-install python.
In my case removing pyc files didn’t work, however re-installing and upgrading python worked fine.
In some other articles around the internet I’ve read that re-installing a related to the error library worked too, no need in my case though.