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

Walking to pokemons but not catching them?

Open harsh1412 opened this issue 10 years ago • 32 comments

Expected Behavior

Catch the pokemons -.-'

Actual Behavior

So sometimes i see its just walking to some random places but not catching the pokemon and then rewalk from there to some place.. like this:

[#] Walking from (30.319318300000003, 78.0343003) to (30.3218183, 78.0343003) fo r approx. 10.0 seconds walking hook 8 [#] Finished walking to (30.3218183, 78.0343003) (30.3218183, 78.0343003, 0) [#] Scanning area for objects (46 / 100) map_cells are 21 [#] Walking from (30.3218183, 78.0343003) to (30.3243183, 78.0343003) for approx . 10.0 seconds walking hook 8 [#] Finished walking to (30.3243183, 78.0343003) (30.3243183, 78.0343003, 0) [#] Scanning area for objects (47 / 100) map_cells are 21 [#] Walking from (30.3243183, 78.0343003) to (30.326818300000003, 78.0343003) fo r approx. 10.0 seconds walking hook 8 [#] Finished walking to (30.326818300000003, 78.0343003) (30.326818300000003, 78.0343003, 0) [#] Scanning area for objects (48 / 100) map_cells are 21 [#] Something rustles nearby! [x] Found pokemon at distance 780.949632048m [#] Walking from (30.326818300000003, 78.0343003) to (30.326137919779427, 78.033 94158134181) for approx. 3.0 seconds [#] Finished walking to (30.326137919779427, 78.03394158134181)

But some times it catches a pokemon

Why is this so?

harsh1412 avatar Jul 22 '16 16:07 harsh1412

Just by looking at this - you are using an outedated version. Please pull the latest version of dev and let me know how you go

eggins avatar Jul 22 '16 16:07 eggins

Latest version of dev crashes with

Traceback (most recent call last):
  File "pokecli.py", line 107, in <module>
    main()
  File "pokecli.py", line 99, in main
    bot.start()
  File "/PokemonGo-Bot/pokemongo_bot/__init__.py", line 26, in start
    self._setup_api()
  File "/PokemonGo-Bot/pokemongo_bot/__init__.py", line 160, in _setup_api
    player = response_dict['responses']['GET_PLAYER']['player_data']
KeyError: 'player_data'

ckrmml avatar Jul 22 '16 16:07 ckrmml

my observation is this is that

bot scans the area -> found pokemon > walk to location

then upon arrival on pokemon location starts to walk again to another location then the loop goes on. then sometimes actually meets the pokemon at the end of the walk and initiates a capture. but detecting pokemon and walking to location and then scan and move again.

. Im not sure if this is because of despawn but it happens fairly even with the latest dev. (including master)

hero16 avatar Jul 22 '16 16:07 hero16

@eggins i am getting same error as @ckrmml when runnning Dev

harsh1412 avatar Jul 22 '16 16:07 harsh1412

@harsh1412 please, destroy your entire environment and reinstall everything from scratch. It looks like you have an outdated version of pgoapi, maybe running pip install -r requirements.txt will solve. I also recommend using virtualenv. @eggins can you link the installation tutorial, please?

douglascamata avatar Jul 22 '16 16:07 douglascamata

Please follow the tutorial on the Wiki: https://github.com/PokemonGoF/PokemonGo-Bot/wiki/Installation

eggins avatar Jul 22 '16 17:07 eggins

@eggins using windows here :p no wiki for windows

harsh1412 avatar Jul 22 '16 17:07 harsh1412

@douglascamata why do i need to do all that stuffs? The master is running fine except for the walking error other then that Dev should also run.. I may be missing some files.?? Could you check if Dev have complete project?

harsh1412 avatar Jul 22 '16 17:07 harsh1412

@harsh1412 we are still developing features in the dev part -and once there is a stable release we will release it to the public

eggins avatar Jul 22 '16 17:07 eggins

In my experience, the player_data key is not present if there are login / server issues. Just run the script again in a few minutes.

And if you're not planning on developing, use the master release. :)

glenncampioni avatar Jul 22 '16 17:07 glenncampioni

by experience yeah player_data is normally associated with login issues as said by Calcyfer

hero16 avatar Jul 22 '16 17:07 hero16

These are both incorrect. Delete the pgoapi folder, and re run the pip install -r requirements.txt

eggins avatar Jul 22 '16 17:07 eggins

@eggins @Calcyfer @hero16 When i try to run Dev project just by downloading the zip it shows this:

Traceback (most recent call last): File "C:\Users\DrDeath\Desktop\PokemonGo-Bot-dev\pokecli.py", line 42, in from pokemongo_bot import PokemonGoBot File "C:\Users\DrDeath\Desktop\PokemonGo-Bot-dev\pokemongo_bot__init__.py", l ine 10, in from pgoapi import PGoApi ImportError: No module named pgoapi

Then i copied the pgoapi from master...

Now this error pops up:

Traceback (most recent call last): File "C:\Users\DrDeath\Desktop\PokemonGo-Bot-dev\pokecli.py", line 42, in from pokemongo_bot import PokemonGoBot File "C:\Users\DrDeath\Desktop\PokemonGo-Bot-dev\pokemongo_bot__init__.py", l ine 11, in from cell_workers import PokemonCatchWorker, SeenFortWorker File "C:\Users\DrDeath\Desktop\PokemonGo-Bot-dev\pokemongo_bot\cell_workers__ init__.py", line 3, in from pokemon_catch_worker import PokemonCatchWorker File "C:\Users\DrDeath\Desktop\PokemonGo-Bot-dev\pokemongo_bot\cell_workers\po kemon_catch_worker.py", line 5, in from utils import distance, print_green, print_yellow, print_red File "C:\Users\DrDeath\Desktop\PokemonGo-Bot-dev\pokemongo_bot\cell_workers\ut ils.py", line 5, in from colorama import init ImportError: No module named colorama

harsh1412 avatar Jul 22 '16 17:07 harsh1412

Check the previous comment from @eggins , you need to install the required modules using pip install -r requirements.txt

The module from master is outdated and will not work correctly.

See the readme on how to install pip.

glenncampioni avatar Jul 22 '16 17:07 glenncampioni

I just redownloaded/cloned the project, followed the wikilink by @eggins https://github.com/PokemonGoF/PokemonGo-Bot/wiki/Installation and it worked

ckrmml avatar Jul 22 '16 17:07 ckrmml

@eggins @ckrmml @Calcyfer got the dev bot working but the walking walking walking is still there.. Is this normal or its a bug?

[#] Something rustles nearby! [#] A Wild Doduo appeared! [CP 372] [x] Using Pokeball... [x] Captured Doduo! [CP 372] [#] A Wild Zubat appeared! [CP 78] [x] Using Pokeball... [x] Captured Zubat! [CP 78] - exchanging for candy [#] Zubat has been exchanged for candy! [#] Scanning area for objects (4 / 100) [#] Walking from (30.326818300000003, 78.04430029999999) to (30.3243183, 78.0443 0029999999) for approx. 10.0 seconds [#] Finished walking [#](30.3243183, 78.04430029999999, 0) [#] Scanning area for objects (5 / 100) [#] Walking from (30.3243183, 78.04430029999999) to (30.3218183, 78.044300299999 99) for approx. 10.0 seconds [#] Finished walking [#](30.3218183, 78.04430029999999, 0) [#] Scanning area for objects (6 / 100) [#] Walking from (30.3218183, 78.04430029999999) to (30.3218183, 78.041800299999 99) for approx. 8.0 seconds

as we can see bot walked 3 times for something right??

harsh1412 avatar Jul 22 '16 17:07 harsh1412

As you can see, the bot scans for objects in a cell but doesnt find anything. You need to set a location that has a couple of pokestops.

glenncampioni avatar Jul 22 '16 17:07 glenncampioni

@eggins Please add a note that we need GIT to run the Dev project..

harsh1412 avatar Jul 22 '16 17:07 harsh1412

@Calcyfer I am not using -s in the command so pokestops are irrelevant in this matter, right?

harsh1412 avatar Jul 22 '16 17:07 harsh1412

@harsh1412 There has just been a commit that removed the -s parameter and replaced with -m or --mode.

The default parameter is --mode all , meaning search for stops and pokemon.

glenncampioni avatar Jul 22 '16 17:07 glenncampioni