View Single Post
Posts: 82 | Thanked: 44 times | Joined on Feb 2010
#15
Originally Posted by mrover View Post
After running whereami.py I am getting following error:

Code:
Getting Location from GPS
Call http://ws.geonames.org/findNearestAddress?lat=xxxxxxxxxxx&lng=xxxxxxxxxx
Traceback (most recent call last):
  File "./whereami.py", line 82, in <module>
    addr=get_addr_from_xml(addrxml)
  File "./whereami.py", line 14, in get_addr_from_xml
    addressobj=xmldoc.firstChild.childNodes[1]
IndexError: list index out of range
Could you tell me what's wrong?
I am not 100% sure, but my guess is that there is a problem accessing geonames to get the address text - you could just remove those lines from the script and it might work, although you would only get the latitude and longitude (which is enough for the GPS fix in any case).
__________________
http://www.whereismydevice.com - Recover your device if lost/stolen

http://jqueryinreallife.blogspot.com - Comedy jQuery blog