rubenvereecken / pokemongo-api

Pokemon Go API for Python
Other
358 stars 120 forks source link

Error in Geo Request #102

Closed reteps closed 8 years ago

reteps commented 8 years ago
     util.setupLogger()
    logging.debug('Logger set up')
    password = "password"
    username = "username@gmail.com"
    auth = "google"
    location = "301 Caldwell Ln Davidson, NC"
    encrypt_lib = "libencrypt-osx-64.so"
    auth_session = PokeAuthSession(
        username,
        password,
        auth,
        location,
        encrypt_lib,
    )   
    session = auth_session.authenticate(locationLookup=location)

My Error

Traceback (most recent call last):
  File "./it", line 29, in <module>
    session = auth_session.authenticate(locationLookup=location)
  File "/usr/local/lib/python2.7/site-packages/pogo/api.py", line 182, in authenticate
    }[self.provider](locationLookup=locationLookup, noop=noop)
  File "/usr/local/lib/python2.7/site-packages/pogo/api.py", line 129, in createGoogleSession
    noop=noop
  File "/usr/local/lib/python2.7/site-packages/pogo/api.py", line 95, in createPogoSession
    location = Location(locationLookup, self.geo_key)
  File "/usr/local/lib/python2.7/site-packages/pogo/location.py", line 26, in __init__
    self.latitude, self.longitude, self.altitude = self.setLocation(locationLookup)
  File "/usr/local/lib/python2.7/site-packages/pogo/location.py", line 57, in setLocation
    raise GeneralPogoException('Error in Geo Request')
pogo.custom_exceptions.GeneralPogoException: Error in Geo Request
dmadisetti commented 8 years ago

Weird. Have you been logging in a lot? Or are you running from an IP where people might be blasting the Google Maps API? Here's the details for Geo Key

https://developers.google.com/maps/documentation/geocoding/get-api-key

reteps commented 8 years ago

Also, I'm trying to create a bot that spins a pokestop every 5 minutes, but after spinning it, and sleeping for 5 minutes. It drops the connection, and gets an error because too many API requests

dmadisetti commented 8 years ago

Ahh alright, then that sounds like your issue right there.

It might be better to keep the session going instead of recreate one everytime.

reteps commented 8 years ago

i'm trying to, why doesn't it let me keep the connection, it disconnects after 5 minutes. I got the Geo Request to work though

dmadisetti commented 8 years ago

I'm going to close this guy out then. Feel free to open a new issue if you want to resolve the connection part