Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

heatmap.py: NameError: name 'low' is not defined #11

Open
emilburzo opened this issue Jun 29, 2016 · 4 comments
Open

heatmap.py: NameError: name 'low' is not defined #11

emilburzo opened this issue Jun 29, 2016 · 4 comments

Comments

@emilburzo
Copy link

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
@HHsty
Copy link

HHsty commented Sep 15, 2016

HHsty@c03e307

@stillnet
Copy link

stillnet commented Oct 2, 2016

@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.

@k9wkj
Copy link

k9wkj commented Dec 15, 2016

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
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: global name 'low' is not defined

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

@jeffkowalski
Copy link

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.

heatmap.py.txt

eric-foy added a commit to eric-foy/rtl-sdr-misc that referenced this issue Oct 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants