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

Crash on launch in dev branch

Open sgitkene opened this issue 10 years ago • 14 comments

Expected Behavior

Start walking towards a pokestop

Actual Behavior

[00:04:51] Scanning area for objects.... [00:04:51] Walking from (4886673895734975231, 4886673885291154728) to [4.886425257326149e+18, 4.886414562853954e+18] 11101.88km Traceback (most recent call last): File "pokecli.py", line 272, in main() File "pokecli.py", line 238, in main bot.take_step() File "/home/max/PokemonGo-Bot/pokemongo_bot/init.py", line 47, in take_step self.process_cells() File "/home/max/PokemonGo-Bot/pokemongo_bot/init.py", line 67, in process_cells "catchable_pokemons": catchable_pokemons}, location) File "/home/max/PokemonGo-Bot/pokemongo_bot/init.py", line 204, in work_on_cell self.navigator.take_step() File "/home/max/PokemonGo-Bot/pokemongo_bot/spiral_navigator.py", line 85, in take_step point['lng'] File "/home/max/PokemonGo-Bot/pokemongo_bot/cell_workers/utils.py", line 33, in distance return 12742 * asin(sqrt(a)) * 1000 ValueError: math domain error

Steps to Reproduce

Start bot with location "Luzern" and cached location turned off. Config: { "auth_service": "google", "username": "[email protected]", "password": "xxx", "location": "Luzern Löwenplatz", "gmapkey": "xxx", "max_steps": 6, "mode": "all", "walk": 4.16, "debug": false, "test": false, "initial_transfer": 0, "location_cache": false, "distance_unit": "km", "item_filter": { "1": { "keep" : 100 }, "101": { "keep" : 10 }, "102": { "keep" : 30 }, "103": { "keep" : 30 }, "201": { "keep" : 30 }, "701": { "keep" : 100 } }, "evolve_all": "NONE", "evolve_speed": 20,

Other Information

OS: Archlinux Git Commit: 15e0161d32c7a78c230c6e75cfd6867663c985d1

sgitkene avatar Jul 27 '16 22:07 sgitkene

this seems related to the coordinates not being passed correctly, like in #1263

sgitkene avatar Jul 27 '16 22:07 sgitkene

Exactly the same problem.

revert to a working commit,

git reset --hard 74e37de

unless you know how to make it work again.

GRB avatar Jul 27 '16 22:07 GRB

+1 Same issue

JonathanRosado avatar Jul 27 '16 22:07 JonathanRosado

I had the same issue, I did a reinstall of the requirements.txt and it is now working fine.

stout01 avatar Jul 27 '16 22:07 stout01

you, it worked like he said.

Do:

c:\python27\scripts\pip.exe install -r requirements.txt --upgrade

and it will work again.

on lixux just do

pip install -r requirements.txt --upgrade

GRB avatar Jul 27 '16 22:07 GRB

Correct, c:\python27\scripts\pip.exe install -r requirements.txt --upgrade is the fix for this. The new version of the PgoAPI we use handles coordinates differently.

glenncampioni avatar Jul 28 '16 00:07 glenncampioni

Still having this issue. Tried reinstalling everything. (pip uninstall -r requirements.txt and then an install) But coordinates are still messed up.

Pgoapi-1.1.0 is the correct one?

jstgnkl avatar Jul 28 '16 00:07 jstgnkl

Can you paste the first line of requirements.txt?

glenncampioni avatar Jul 28 '16 00:07 glenncampioni

@Calcyfer -e git+https://github.com/tejado/pgoapi.git@81e786cabf027a1c8fbd1e9a07e1c11aa3d8ee8b#egg=pgoapi

jstgnkl avatar Jul 28 '16 00:07 jstgnkl

That's the right one. Does /pokemongo_bot/init.py have i2f in it anywhere? If not, what are the coordinates you are giving?

glenncampioni avatar Jul 28 '16 00:07 glenncampioni

Yes it does.

from cell_workers.utils import distance, get_cellid, encode, i2f

Coordinates are: 40.782771,-73.969303

jstgnkl avatar Jul 28 '16 01:07 jstgnkl

If that's the only location i2f is present in that file, that's not the issue.

Have you tried removing the entire folder (keeping config) and re-pulling and installing?

If that doesn't fix it, I'm afraid I can't figure out what the issue is.

glenncampioni avatar Jul 28 '16 01:07 glenncampioni

@Calcyfer removed everything and repulled and it's working fine now. No idea where the problem would lie. Thanks :)

jstgnkl avatar Jul 28 '16 01:07 jstgnkl

Welcome, glad it works. :)

glenncampioni avatar Jul 28 '16 01:07 glenncampioni