tejado / pgoapi

Pokemon Go API lib
Other
1.4k stars 445 forks source link

KeyError: 'profile' when running #81

Closed GhaziBenDahmane closed 8 years ago

GhaziBenDahmane commented 8 years ago
Traceback (most recent call last):
  File "pokecli.py", line 120, in <module>
    main()
  File "pokecli.py", line 114, in main
    bot.start()
  File "/home/xxx/PokemonGo-Bot/bot.py", line 24, in start
    self._setup_api()
  File "/home/xxx/PokemonGo-Bot/bot.py", line 155, in _setup_api
    player = response_dict['responses']['GET_PLAYER']['profile']
KeyError: 'profile'

I'm having this error whenever i'm trying to run the client , every requirement is installed and i'm pretty sure my account's data are correct . does anyone know where the problem is coming from?

ztukaz commented 8 years ago

['GET_PLAYER']['player_data'] cause profile doesn't exist in the response

patrik7 commented 8 years ago

I am having the exact opposite problem pgoapi returns response_dict['responses']['GET_PLAYER']['profile'] while the code expects player_data

tejado commented 8 years ago

In which commit version of pgoapi do you have this issue?

patrik7 commented 8 years ago

I tried installing and uninstalling pgoapi multiple times, actually, I spent few hours on this. It seems like the protobufs generated in the past, 3 days back (as sudo), were not being overwritten on reinstalls. I am trying a vanila directory with vanila venv. If that works I'll close this ticket.

patrik7 commented 8 years ago

It's working! I am good. Thanks tejado