mozilla-mobile / prox-server

[INACTIVE] Server & data scripts for the Prox client.
https://github.com/mozilla-mobile/prox/
Mozilla Public License 2.0
5 stars 5 forks source link

Unicode lat long in yelp businesses aborting event crawling. #73

Closed jhugman closed 8 years ago

jhugman commented 8 years ago
Dec 02 15:20:26 ip-172-31-12-95 python[18051]: ERROR:prox:Error researching venue
Dec 02 15:20:26 ip-172-31-12-95 python[18051]: Traceback (most recent call last):
Dec 02 15:20:26 ip-172-31-12-95 python[18051]:   File "app/request_handler.py", line 130, in researchEvent
Dec 02 15:20:26 ip-172-31-12-95 python[18051]:     eventObj = getEventfulEventObj(eventfulObj)
Dec 02 15:20:26 ip-172-31-12-95 python[18051]:   File "app/request_handler.py", line 229, in getEventfulEventObj
Dec 02 15:20:26 ip-172-31-12-95 python[18051]:     yelpId = _guessYelpId(event['venue_name'], locLat, locLng)
Dec 02 15:20:26 ip-172-31-12-95 python[18051]:   File "app/request_handler.py", line 197, in _guessYelpId
Dec 02 15:20:26 ip-172-31-12-95 python[18051]:     biz = min(r.businesses, key=lambda b:
Dec 02 15:20:26 ip-172-31-12-95 python[18051]:   File "app/request_handler.py", line 199, in <lambda>
Dec 02 15:20:26 ip-172-31-12-95 python[18051]:     (b.location.coordinate.latitude, b.location.coordinate.longitude))
Dec 02 15:20:26 ip-172-31-12-95 python[18051]:   File "app/geo.py", line 44, in distance
Dec 02 15:20:26 ip-172-31-12-95 python[18051]:     latDelta = degreesToRadians(location2[0] - location1[0]);
Dec 02 15:20:26 ip-172-31-12-95 python[18051]: TypeError: unsupported operand type(s) for -: 'float' and 'unicode'
jhugman commented 8 years ago

These seems to be happening with eventful events.

liuche commented 8 years ago

This should be fixed by #71, where we explicitly set the type for lat/lng.