rtl-sdr-misc
rtl-sdr-misc copied to clipboard
heatmap.py: NameError: name 'low' is not defined
When using heatmap.py with the --low
argument, e.g.:
./heatmap.py --low 24M --high 29M data.csv all.png
I get the following:
loading
Traceback (most recent call last):
File "./heatmap.py", line 615, in <module>
summarize_pass(args)
File "./heatmap.py", line 261, in summarize_pass
start_col, stop_col = slice_columns(columns, args.low_freq, args.high_freq)
File "./heatmap.py", line 223, in slice_columns
if low_freq is not None and low <= low_freq <= high:
NameError: name 'low' is not defined
https://github.com/HHsty/rtl-sdr-misc/commit/c03e3070bbdf0a96d5e771564979297a81298967
@keenerd I am not a python programmer but I am a programmer. If you give me some pointers as to what you think the problem is and how to fix it, I can take a stab at it.
im stumbling onto this now as well
wayne-desk@wayne-desk:~$ ./heatmap.py --ytick 5m --low 144M --high 148M 2m1214162325.csv 2m1214162325.png
loading
Traceback (most recent call last):
File "./heatmap.py", line 615, in
looking under the hood "low" seems to be defined the same (but opposite) of "high" but it could be a simple syntax error for all i know i am not a programmer nor do i play one on TV
It looks to me like the slice_columns
function was factored from some inline code at some point, and care wasn't taken to make sure all the necessary variables were in scope.
So, I passed in low
and high
from the calling context, and it appears to work OK.
Sorry to be a bit lazy and not make a pull request. Modified file attached below.