mattritchey commited on
Commit
bb3ae4c
·
verified ·
1 Parent(s): fcd57c7

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +6 -4
main.py CHANGED
@@ -54,10 +54,12 @@ def get_hail_data(address, start_date, end_date, radius_miles, get_max):
54
  lat, lon= geocode_address(address)
55
 
56
  # Convert Lat Lon to row & col on Array
57
-
58
- transform = pickle.load(open('Data/transform_mrms.pkl', 'rb'))
59
-
60
- row, col = rasterio.transform.rowcol(transform, lon, lat)
 
 
61
 
62
 
63
  # files = [
 
54
  lat, lon= geocode_address(address)
55
 
56
  # Convert Lat Lon to row & col on Array
57
+ try:
58
+ transform = pickle.load(open('Data/transform_mrms.pkl', 'rb'))
59
+
60
+ row, col = rasterio.transform.rowcol(transform, lon, lat)
61
+ except:
62
+ row=col=None
63
 
64
 
65
  # files = [