PokemonGo-Bot icon indicating copy to clipboard operation
PokemonGo-Bot copied to clipboard

TypeError: 'bool' object has no attribute '__getitem__'

Open Snorbitz opened this issue 10 years ago • 18 comments

Probably Missing something but a little guidance would be appreciated....

[14:31:35] Attempting login to Pokemon Go. [14:31:38] Login to Pokemon Go successful. Traceback (most recent call last): File "C:\pokebot\PokemonGo-Bot\pokecli.py", line 224, in main() File "C:\pokebot\PokemonGo-Bot\pokecli.py", line 210, in main bot.start() File "C:\pokebot\PokemonGo-Bot\pokemongo_bot__init__.py", line 31, in start self.setup_api() File "C:\pokebot\PokemonGo-Bot\pokemongo_bot__init_.py", line 269, in _setup_api player = response_dict['responses']['GET_PLAYER']['player_data'] TypeError: 'bool' object has no attribute 'getitem'

OS: Windows 10

Snorbitz avatar Jul 26 '16 04:07 Snorbitz

Traceback (most recent call last):
  File "pokecli.py", line 220, in <module>
    main()
  File "pokecli.py", line 206, in main
    bot.start()
  File "/home/alvaro/Pokemon/PokemonGo-Bot.git/pokemongo_bot/__init__.py", line 31, in start
    self._setup_api()
  File "/home/alvaro/Pokemon/PokemonGo-Bot.git/pokemongo_bot/__init__.py", line 151, in _setup_api
    player = response_dict['responses']['GET_PLAYER']['player_data']
KeyError: 'player_data'

OS: Ubuntu

dragonalvaro avatar Jul 26 '16 08:07 dragonalvaro

image

6a9e74c91b9f5234f74c0cb09ec2568f1f37f01f

hklcf avatar Jul 26 '16 13:07 hklcf

This is a issue probably caused by the Pokémon Go servers. It only appears when the servers are not reachable for some reason.

lelmac avatar Jul 26 '16 14:07 lelmac

@TheOssi can make it retry ?

hklcf avatar Jul 26 '16 14:07 hklcf

run a simple bash script. while true; do ./pokecli.py; done

ar1a avatar Jul 26 '16 14:07 ar1a

the problem seems to be trying to launch two bot on the same machine, so i've make it work by using a screen session more information about screen and how to use screen here (rackaid.com)

but for the basics : screen -S mysessionname to create a new screen session Do your business (including clone the repo ,setup it, and launch it) and use CTRL-A-D to exit the screen session Now from here do the same with a different name for all the bot you want to launch If you want to get back you your session, use screen -r mysessionname or screen -r with no argument to show up a list of your active session

mehdi-S avatar Jul 27 '16 12:07 mehdi-S

not exactly on topic, but tmux would be a better alternative to screen.

ar1a avatar Jul 27 '16 13:07 ar1a

@Snorflake can you develop ?

mehdi-S avatar Jul 27 '16 13:07 mehdi-S

indeed I can

On Wed, 27 Jul 2016, 9:10 PM mehdi-S [email protected] wrote:

@Snorflake https://github.com/Snorflake can you develop ?

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/PokemonGoF/PokemonGo-Bot/issues/915#issuecomment-235579725, or mute the thread https://github.com/notifications/unsubscribe-auth/AIC5JxxDYeQ6EzMLHso9Bym5e_ew6zmHks5qZ1jEgaJpZM4JUyES .

ar1a avatar Jul 27 '16 13:07 ar1a

?

mehdi-S avatar Jul 27 '16 13:07 mehdi-S

Just got the same error, after a few minutes running the latest 'master'

[2016-07-27 20:05:57] [#] PokeStop on cooldown. Time left: 4.61 minutes
[2016-07-27 20:05:59] [#] Found fort d950340f722c4111936a83d7282a3037.16 at distance 0.20km
[2016-07-27 20:05:59] [#] Need to move closer to Pokestop
[2016-07-27 20:05:59] [#] Walking from (52.296738, 5.250926) to (52.295504, 5.245426) for approx. 1.60 minutes
[2016-07-27 20:06:56] [#] Something rustles nearby!
[2016-07-27 20:06:57] [#] A Wild Rattata appeared! [CP 183] [Potential 0.44]
[2016-07-27 20:06:57] [#] IV [Stamina/Attack/Defense] = [8/10/2]
Traceback (most recent call last):
  File "pokecli.py", line 220, in <module>
    main()
  File "pokecli.py", line 211, in main
    bot.take_step()
  File "/home/ubuntu/PokemonGo-Bot/pokemongo_bot/__init__.py", line 36, in take_step
    self.stepper.take_step()
  File "/home/ubuntu/PokemonGo-Bot/pokemongo_bot/stepper.py", line 62, in take_step
    self._work_at_position(position[0], position[1], position[2], True)
  File "/home/ubuntu/PokemonGo-Bot/pokemongo_bot/stepper.py", line 139, in _work_at_position
    self.bot.work_on_cell(cell, position, pokemon_only)
  File "/home/ubuntu/PokemonGo-Bot/pokemongo_bot/__init__.py", line 93, in work_on_cell
    worker.work()
  File "/home/ubuntu/PokemonGo-Bot/pokemongo_bot/cell_workers/move_to_fort_worker.py", line 30, in work
    self.stepper._walk_to(self.config.walk, *position)
  File "/home/ubuntu/PokemonGo-Bot/pokemongo_bot/stepper.py", line 88, in _walk_to
    alt, False)
  File "/home/ubuntu/PokemonGo-Bot/pokemongo_bot/stepper.py", line 139, in _work_at_position
    self.bot.work_on_cell(cell, position, pokemon_only)
  File "/home/ubuntu/PokemonGo-Bot/pokemongo_bot/__init__.py", line 63, in work_on_cell
    if self.catch_pokemon(pokemon) == PokemonCatchWorker.NO_POKEBALLS:
  File "/home/ubuntu/PokemonGo-Bot/pokemongo_bot/__init__.py", line 190, in catch_pokemon
    return_value = worker.work()
  File "/home/ubuntu/PokemonGo-Bot/pokemongo_bot/cell_workers/pokemon_catch_worker.py", line 74, in work
    balls_stock = self.bot.pokeball_inventory()
  File "/home/ubuntu/PokemonGo-Bot/pokemongo_bot/__init__.py", line 234, in pokeball_inventory
    inventory_dict = inventory_req['responses']['GET_INVENTORY'][
TypeError: 'bool' object has no attribute '__getitem__'

RolfKoenders avatar Jul 27 '16 20:07 RolfKoenders

same as @RolfKoenders here

Yky avatar Jul 28 '16 04:07 Yky

server problem

hklcf avatar Jul 28 '16 10:07 hklcf

I don't believe this is a server problem--I literally just logged off on my mobile device and tried running the bot but same error.

sangwon04 avatar Jul 28 '16 14:07 sangwon04

@sangwon04 So what's the problem?

Many ppl reported the login issue (even google or ptc acc) include me

hklcf avatar Jul 28 '16 14:07 hklcf

I have the save issue and we are not alone: http://downdetector.com/status/pokemon-go

RoykeHD avatar Jul 28 '16 15:07 RoykeHD

@hklcf I was able to resolve the issue--there was a zombie cmd process that I had to kill.

sangwon04 avatar Jul 28 '16 15:07 sangwon04

Please upgrade to the latest dev branch by running this command:

git reset --hard
git pull -f

Then run this command: pip install --upgrade -r requirements.txt

If issue persists, open a new issue.

/closed

AdaptCharm avatar Jul 29 '16 18:07 AdaptCharm