jantman / python-wifi-survey-heatmap

A Python application for Linux machines to perform WiFi site surveys and present the results as a heatmap overlayed on a floorplan
GNU Affero General Public License v3.0
375 stars 88 forks source link

Handle missing data points #15

Closed chris-reeves closed 2 years ago

chris-reeves commented 2 years ago

Handle missing data points when calculating thresholds. These are most likely to occur when attempting to measure UDP upload in areas with weak signal and the user chooses not to retry a failed measurment.

Without this, wifi-heatmap-thresholds fails with the following error:

Traceback (most recent call last):                                                                                                                                                                                                              
  File "/usr/local/bin/wifi-heatmap-thresholds", line 11, in <module>                                                                                                                                                                                                                                                          
    load_entry_point('wifi-survey-heatmap', 'console_scripts', 'wifi-heatmap-thresholds')()                                                                                                                                                                                                                                    
  File "/app/wifi_survey_heatmap/thresholds.py", line 127, in main                                                                                                                                                                                                                                                             
    ThresholdGenerator().generate(args.TITLE)                                                                                                                                                                                                                                               
  File "/app/wifi_survey_heatmap/thresholds.py", line 59, in generate                                                                                                                                                                                                                                                          
    min(x[key]) for x in items                                                                                                                                                                                                  
  File "/app/wifi_survey_heatmap/thresholds.py", line 59, in <listcomp>                                                                                                                                                                                                                                                        
    min(x[key]) for x in items                                                                                                                                                                                                  
TypeError: '<' not supported between instances of 'NoneType' and 'float'                                                                                                                                                                                                                                                       

Contributor License Agreement

By submitting this work for inclusion in wifi-survey-heatmap, I agree to the following terms:

jantman commented 2 years ago

Apologies for letting this sit for so long, but thank you so much!