Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception raised: 'MapPokemon' object has no attribute 'pokemon_data' #62

Open
envi253 opened this issue Aug 1, 2016 · 3 comments
Open

Comments

@envi253
Copy link

envi253 commented Aug 1, 2016

Whenever the Bot catches a Pokemon i get this Exception which causes reauthentification.
This only happens since today. Niantic must have changed something with their servers or somethin. Tried to track down the issue by looking at the code but couldnt figure it out.

Line 68,demo.py - 2016-08-01 20:50:40,519 - INFO - ZUBAT, 53.002505 meters away Line 391,demo.py - 2016-08-01 20:50:40,521 - CRITICAL - Exception raised: 'MapPokemon' object has no attribute 'pokemon_data' Line 83,api.py - 2016-08-01 20:50:40,522 - INFO - Creating Google session for XXXXXXXX Line 788,connectionpool.py - 2016-08-01 20:50:40,531 - INFO - Starting new HTTPS connection (1): android.clients.google.com Line 788,connectionpool.py - 2016-08-01 20:50:41,406 - INFO - Starting new HTTPS connection (1): android.clients.google.com

Anyone had any success with this?

@dnsBlah
Copy link
Contributor

dnsBlah commented Aug 1, 2016

use this for getting pokemon id

pokemonId = getattr(pokemon, "pokemon_id", None)
            if not pokemonId:
                pokemonId = pokemon.pokemon_data.pokemon_id

There is not always a pokemon_data inside pokemon. Depends on the type of pokemon you find

@dmadisetti
Copy link
Collaborator

? Do you have any examples @dnsBlah

@dnsBlah
Copy link
Contributor

dnsBlah commented Aug 13, 2016

lately I found that catchable and nearby pokemon are 1 and the same, I do a double check after I filter the pokemon out, I loop to only return unique encounter ids
sometimes its double
simetimes its not
one of the 2 types has pokemon_id directly and missing pokemon_data

thats why I get the id as mentioned in my previous comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants