From 6b1f2eb72f12027aa0ec81e80b7c96ac736d36ac Mon Sep 17 00:00:00 2001 From: Barry McCardel Date: Wed, 13 Nov 2019 06:12:02 -0800 Subject: [PATCH] Minor error fixes Changes to two lines to fix errors that pop up when trying to execute this code --- suncalc.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/suncalc.py b/suncalc.py index bb88964..b828e33 100644 --- a/suncalc.py +++ b/suncalc.py @@ -66,7 +66,7 @@ def hourAngle(h, phi, d): return ret except ValueError as e: print(h, phi, d) - print e + print(e) def solarMeanAnomaly(d): return rad * (357.5291 + 0.98560028 * d) @@ -132,11 +132,11 @@ def getTimes(date, lat, lng): result = dict() for i in range(0, len(times)): - time = times[i] - Jset = getSetJ(time[0] * rad, lw, phi, dec, n, M, L); - Jrise = Jnoon - (Jset - Jnoon); - result[time[1]] = fromJulian(Jrise).strftime('%Y-%m-%d %H:%M:%S'); - result[time[2]] = fromJulian(Jset).strftime('%Y-%m-%d %H:%M:%S'); + time = times[i] + Jset = getSetJ(time[0] * rad, lw, phi, dec, n, M, L); + Jrise = Jnoon - (Jset - Jnoon); + result[time[1]] = fromJulian(Jrise).strftime('%Y-%m-%d %H:%M:%S'); + result[time[2]] = fromJulian(Jset).strftime('%Y-%m-%d %H:%M:%S'); return result