Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Issues with Weather-Based Water Level
#8
Try changing line ~397 from len_in = round(safe_float(len_mm) // 25.4, 1) to
Code:
len_in = round(safe_float(len_mm) / 25.4, 1)
The "//" division is returning an int. The "/" division returns a float ("true division")

Note: this is only true under Python3.

Edit:
another way to fix this is to use multiplication:

Code:
len_in = round(safe_float(len_mm) * 0.03937, 1)
1 / 25.4 = 0.03937 This will work under both Python 2 & 3.

Dan
<p><br></p>
Reply


Messages In This Thread
RE: Issues with Weather-Based Water Level - by dan - 2020 Jan 20, 12:16 AM
RE: Issues with Weather-Based Water Level - by dan - 2020 Jan 21, 03:39 PM
RE: Issues with Weather-Based Water Level - by dan - 2020 Jan 30, 05:06 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)