Problems compiling with gnuradio - installation

I installed gnuradio on Ubuntu 18.04, but I'm not sure if I did it correctly. I try to build https://github.com/ccera-astro/spectro_radiometer, but it doesn't work. I received errors like:
>>> Converting from XML
ERROR:gnuradio.grc.core.FlowGraph:Failed to evaluate import expression "import spectro_helper # embedded python module"
Traceback (most recent call last):
File "/usr/local/lib/python3/dist-packages/gnuradio/grc/core/FlowGraph.py", line 234, in renew_namespace
exec(expr, namespace)
File "<string>", line 1, in <module>
File "/home/antonio/Downloads/spectro_radiometer/spectro_helper.py", line 97
print "Setting mask at F %f position %d (%f)" % (float(f), i, incr*float(i))
^
SyntaxError: invalid syntax
ERROR:gnuradio.grc.core.FlowGraph:Failed to evaluate expression in module spectro_helper
Traceback (most recent call last):
File "/usr/local/lib/python3/dist-packages/gnuradio/grc/core/FlowGraph.py", line 247, in renew_namespace
exec(expr, module.__dict__)
File "<string>", line 97
print "Setting mask at F %f position %d (%f)" % (float(f), i, incr*float(i))
Can anybody help me to install the proper version of gnuradio or to resolve these issues because I tried on MacOS as well and it didn't work.

Related

'Error compiling Cython file error' from one day to another

I use a lot of special characters from Hun language, and there were no problems previously. Now they all give errors when running the whole script (F9). It still runs perfect when running locally (select + F5).
Fúú='bar'
Traceback:
C:\Users\my name\.ipython\cython\_cython_magic_21a3824690cdb52a9fe6a3fa1c63ee73.pyx:1:1: Unrecognized character
Traceback (most recent call last):
File "<ipython-input-6-dcfab52d0ff4>", line 1, in <module>
runfile('E:/Anyagok/Programozas/Python/projekts/elo/mindennap/untitled0.pyx', wdir='E:/Anyagok/Programozas/Python/projekts/elo/mindennap')
File "E:\Download\PROGIK\ANACONDA\lib\site-packages\spyder\utils\site\sitecustomize.py", line 703, in runfile
ipython_shell.run_cell_magic('cython', '', f.read())
File "E:\Download\PROGIK\ANACONDA\lib\site-packages\IPython\core\interactiveshell.py", line 2131, in run_cell_magic
result = fn(magic_arg_s, cell)
File "<decorator-gen-130>", line 2, in cython
File "E:\Download\PROGIK\ANACONDA\lib\site-packages\IPython\core\magic.py", line 187, in <lambda>
call = lambda f, *a, **k: f(*a, **k)
File "E:\Download\PROGIK\ANACONDA\lib\site-packages\Cython\Build\IpythonMagic.py", line 321, in cython
assert len(extensions) == 1
TypeError: object of type 'NoneType' has no len()
If I change to e.g.
Fuu='bar'
it works great. Why the sudden change of heart?
EDIT:
Have been messing around with FFMPEG and LIBAV yesterday, because wanted to download and convert Youtube videos to mp3. But I'm pretty sure I ran scripts with these characters succesfully after it.

Behave in parallel

I try to run behave tests in parallel. For this I use behave-parallel lib and demo project https://github.com/vishalm/behave_parallel_demo. But OS is Windows 10. After steps from Read_me file. I am getting next Tracebacks
(behave_parallel_demo-master) D:\Python_projects\behave_parallel_demo-master>behave --processes 5 --parallel-element feature
INFO: 0 scenario(s) and 3 feature(s) queued for consideration by 5 workers. Some may be skipped if the -t option was given...
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\python27\Lib\multiprocessing\forking.py", line 381, in main
self = load(from_parent)
File "c:\python27\Lib\pickle.py", line 1384, in load
return Unpickler(file).load()
File "c:\python27\Lib\pickle.py", line 864, in load
dispatch[key](self)
File "c:\python27\Lib\pickle.py", line 1089, in load_newobj
obj = cls.__new__(cls, *args)
TypeError: __new__() takes exactly 3 arguments (2 given)
Traceback (most recent call last):
File "c:\python27\Lib\runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "c:\python27\Lib\runpy.py", line 72, in _run_code
exec code in run_globals
File "C:\Users\Andriy_Petrenko\Envs\behave_parallel_demo-master\Scripts\behave.exe\__main__.py", line 9, in <module>
File "c:\users\andriy_petrenko\envs\behave_parallel_demo-master\lib\site-packages\behave\__main__.py", line 111, in main
failed = runner.run()
File "c:\users\andriy_petrenko\envs\behave_parallel_demo-master\lib\site-packages\behave\runner.py", line 561, in run
return self.run_with_paths()
File "c:\users\andriy_petrenko\envs\behave_parallel_demo-master\lib\site-packages\behave\runner.py", line 583, in run_with_paths
return self.run_multiproc()
File "c:\users\andriy_petrenko\envs\behave_parallel_demo-master\lib\site-packages\behave\runner.py", line 690, in run_multiproc
p.start()
File "c:\python27\Lib\multiprocessing\process.py", line 130, in start
self._popen = Popen(self)
File "c:\python27\Lib\multiprocessing\forking.py", line 280, in __init__
to_child.close()
IOError: [Errno 22] Invalid argument
What I do wrong or is this OS problem? It looks like that 5 workers were up but 1st problem is that TypeError: __new__() takes exactly 3 arguments (2 given) and 2nd IOError: [Errno 22] Invalid argument
I am not familiar with Behave so not sure whether you are passing the command line correctly but this error means that one of the method is expecting more arguments than you have provided. In this case, it's during creation of cls instance:
File "c:\python27\Lib\pickle.py", line 1089, in load_newobj
obj = cls.__new__(cls, *args)
This looks like some internal class instance so you do not control it directly so make sure you pass enough and correct arguments at command line.
Update your Behave package. it will work.
We have been trying for a long time to implement parallel test executions with behave (which is an amazing framework). Finally, we created our own wrapper on top of Behave, called BehaveX, that not only allow us to execute tests in parallel, but also comes with great reports and some additional features:
https://github.com/hrcorval/behavex
As BehaveX is implemented over the Behave framework, with this wrapper you should be able to replace the "behave" executable by "behavex", and run the tests in parallel using the following commands:
behavex -t #TAG --parallel-processes 4 --parallel-scheme scenario
behavex -t #TAG --parallel-processes 3 --parallel-scheme feature

Julia Kernel Error in Jupyter Notebook (Anaconda)

When I open a Julia 0.6.0 notebook using Jupyter, the kernel tries to connect, fails and the a red button "Kernel Error" appears at the top right of the notebook. I uninstalled and reinstalled, but nothing has changed. The following is the message I got when I click on the "Kernel error":
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\site-packages\notebook\base\handlers.py", line 516, in wrapper
result = yield gen.maybe_future(method(self, *args, **kwargs))
File "C:\ProgramData\Anaconda3\lib\site-packages\tornado\gen.py", line 1055, in run
value = future.result()
File "C:\ProgramData\Anaconda3\lib\site-packages\tornado\concurrent.py", line 238, in result
raise_exc_info(self._exc_info)
File "<string>", line 4, in raise_exc_info
File "C:\ProgramData\Anaconda3\lib\site-packages\tornado\gen.py", line 1063, in run
yielded = self.gen.throw(*exc_info)
File "C:\ProgramData\Anaconda3\lib\site-packages\notebook\services\sessions\handlers.py", line 75, in post
type=mtype))
File "C:\ProgramData\Anaconda3\lib\site-packages\tornado\gen.py", line 1055, in run
value = future.result()
File "C:\ProgramData\Anaconda3\lib\subprocess.py", line 707, in __init__
restore_signals, start_new_session)
File "C:\ProgramData\Anaconda3\lib\subprocess.py", line 990, in _execute_child
startupinfo)
OSError: [WinError 740] The requested operation requires elevation.
Thanks in advance for your help!
It seem like you do not have enough permissions to start the Julia Kernel.
You should not need to be administrator to use the Julia kernel, but it seem like your computer is believing you should.
Try running the julia interpreter, and kernel manually to see if you can.

sublimeREPL for python not showing complete Traceback

I'm trying to run my python code using sublimeREPL's "Python - RUN current file" command
It works fine if my program has no problems, but when it does, it doesn't show the complete Traceback (I don't get to see the "Repl Closed" message), and the output its not even consistent. Below two runs of the exactly same file (not posting images because stackoverflow doesn't allows me to because I'm new):
First Run:
------- Ford Fulkerson -------
Traceback (most recent call last):
File "Ford-Fulkerson.py", line 282, in <module>
D = FordFulkersonGeneral(G, ['A'], ['E'], None, restricciones)
File "Ford-Fulkerson.py", line 71, in FordFulk|
Second Run:
------- Ford Fulkerson -------
Traceback (most recent call last):
File "Ford-Fulkerson.py", line 282, in <module>
D = FordFulkersonGeneral(G, ['A'], ['E'
I was using the Anaconda's (64 bit) python distribution. Then I changed to a regular python (32 bit) install (made sure the window's path was all right) and even there its not working.
If I run my code from window's terminal I get the full Traceback (the actual error is not important, I know how to fix it):
------- Ford Fulkerson -------
Traceback (most recent call last):
File "Ford-Fulkerson.py", line 282, in <module>
D = FordFulkersonGeneral(G, ['A'], ['E'], None, restricciones)
File "Ford-Fulkerson.py", line 71, in FordFulkersonGeneral
G.deleteNode(v)
File "C:\Users\myusername\Documents\Learning\Anßlisis de Re
des\Ford-Fulkerson\mvr_graph.py", line 196, in deleteNode
self.nodes[node].delete(n)
AttributeError: 'dict' object has no attribute 'delete'
Edit:
I've found the answer by posting this question. The problem was in the path of the file - it contains an accent in the word "Análisis". I changed that and know its working.
It used to work when I had my OS language set to spanish. I set my new installation to english and now it was giving me trouble. I really didn't expected that, shame on you Windows x(.
I don't really know the protocol, I will just leave this question here in case anyone is going through this obscure thing.
I've found the answer by posting this question. The problem was in the path of the file - it contains an accent in the word "Análisis". I changed that and know its working.
It used to work when I had my OS language set to spanish. I set my new installation to english and now it was giving me troubles. I really didn't expected that, shame on you Windows x(.

virtualenv AssertionError on Mac Maverick

The virtualenv broke. I've tried updating, re-installing with pip, setuptools, virtualenv in a bunch of combinations, but nothing works. I've also used brew doctor and still no clue to the problem. Does anyone have this problem and have found a fix? Am I missing a package before installing virtualenv?
Also, if you have similar assertionError, please comment. Maybe we can find a solution together.
Thanks!
$ virtualenv test1
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.7/bin/virtualenv", line 9, in <module>
load_entry_point('virtualenv==1.11', 'console_scripts', 'virtualenv')()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/virtualenv.py", line 820, in main
symlink=options.symlink)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/virtualenv.py", line 980, in create_environment
site_packages=site_packages, clear=clear, symlink=symlink))
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/virtualenv.py", line 1176, in install_python
copy_required_modules(home_dir, symlink)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/virtualenv.py", line 1114, in copy_required_modules
dst_filename = change_prefix(filename, dst_prefix)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/virtualenv.py", line 1079, in change_prefix
(filename, prefixes)
AssertionError: Filename /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/readline.so does not start with any of these prefixes: ['/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python', '/Users/user1/Library/Python/2.7/lib/python/site-packages', '/Users/user1/.local/lib/python/2.7/site-packages', '/Library/Frameworks/Python.framework/Versions/2.7', '/Users/user1/Library/Python/2.7/site-packages', '/Library/Python/2.7/site-packages']

Resources