title: TypeError: unsupported operand type(s) for -: 'unicode' and 'unicode', coords
body: <p>full code is <a href="https://github.com/stuycs-ml7-projects/YAN-SHAN-PHAN-WU/" rel="noreferrer">HERE</a></p>
  
  <p>HTML code</p>
  
  <pre><code>&lt;input type="hidden" id="Latitude" name="Latitude" value={{Longitude}} /&gt;
  &lt;input type="hidden" id="Longitude" name="Longitude" value={{Longitude}} /&gt;
  
  document.getElementById("Latitude").value  =  position.coords.latitude;
  document.getElementById("Longitude").value =  position.coords.longitude;    
  </code></pre>
  
  <p>app.py</p>
  
  <pre><code>Latitude = request.form['Latitude']
  Longitude = request.form['Longitude']
  
  messages = database.returnMessagesinRange(float(Latitude),float(Longitude))
  </code></pre>
  
  <p>database.py</p>
  
  <pre><code>def returnMessagesinRange(longitude,latitude):
      allMessages = Messages.find()
      messagesinRange = []
      for current in allMessages:
          if ((current['longitude']-longitude) * (current['longitude']-longitude) + (current['latitude']-latitude)*(current['latitude']-latitude)) &lt;= 1:
              if messagesinRange == None:
                  messagesinRange = [current['text']]
              else:
                  messagesinRange.append(current['text'])
      return messagesinRange
  </code></pre>
  
  <p>When this is run, i get </p>
  
  <pre><code>if ((current['longitude']-longitude) * (current['longitude']-longitude) + (current['latitude']-latitude)*(current['latitude']-latitude)) &lt;= 1:
  </code></pre>
  
  
  
  <pre><code>TypeError: unsupported operand type(s) for -: 'unicode' and 'unicode'
  </code></pre>
  
  <p>Anyone know why this is happening? thanks.</p>