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

Pokemongobot object has no attribute 'position'

Open HelloTroy opened this issue 10 years ago • 12 comments

Expected Behavior

When I go to json.config and add a latitude and longitude or city/state combination they do not work.

Actual Behavior

[2016-08-02 12:56:25] [x] PokemonGO Bot v1.0 [2016-08-02 12:56:25] [x] Configuration initialized [2016-08-02 12:56:26] [x] The location given using -l could not be parsed. Checking for a cached location. [2016-08-02 12:56:27] [#] Username: HIDDEN [2016-08-02 12:56:27] [#] Acccount Creation: HIDDEN [2016-08-02 12:56:28] [#] Bag Storage: 296/350 [2016-08-02 12:56:28] [#] Pokemon Storage: 234/250 [2016-08-02 12:56:28] [#] Stardust: 56617 [2016-08-02 12:56:28] [#] Pokecoins: 0 [2016-08-02 12:56:28] [#] PokeBalls: 19 [2016-08-02 12:56:28] [#] GreatBalls: 3 [2016-08-02 12:56:28] [#] UltraBalls: 0 [2016-08-02 12:56:28] [#] -- Level: 16 [2016-08-02 12:56:28] [#] -- Experience: 137823 [2016-08-02 12:56:28] [#] -- Experience until next level: 2177 [2016-08-02 12:56:28] [#] -- Pokemon Captured: 430 [2016-08-02 12:56:28] [#] -- Pokestops Visited: 322 [2016-08-02 12:56:28] [#] Traceback (most recent call last): File "pokecli.py", line 220, in main() File "pokecli.py", line 206, in main bot.start() File "/Users/tr/PokemonGo-Bot/pokemongo_bot/init.py", line 32, in start self.stepper = Stepper(self) File "/Users/tr/PokemonGo-Bot/pokemongo_bot/stepper.py", line 32, in init self.origin_lat = self.bot.position[0] AttributeError: 'PokemonGoBot' object has no attribute 'position'

Steps to Reproduce

just type python pokecli.py

Other Information

OS: OS X YOSEMITE Git Commit: Python Version: 2.7

HelloTroy avatar Aug 02 '16 20:08 HelloTroy

Did you checkout to dev?

fe-ax avatar Aug 02 '16 20:08 fe-ax

@Marco208 meaning? Confused, sorry

{ "auth_service": "google", "username": "Y", "password": "X", "location": "55.6, 12.5", #The space here has nothing to do with it, tried adjusting that. "gmapkey": "Z", "max_steps": 5, "mode": "all", "walk": 4.16, "debug": false, "test": false, "initial_transfer": 0, "location_cache": true, "distance_unit": "km", "item_filter": "101,102,103,104", "evolve_all": "NONE" }

HelloTroy avatar Aug 02 '16 20:08 HelloTroy

That location is likely not precise enough -- a tenth of a degree in latitude is huge -- roughly 6.9 miles.

JSchwerberg avatar Aug 02 '16 20:08 JSchwerberg

Location precision is not an issue, tried it to varying degrees of distance

HelloTroy avatar Aug 02 '16 20:08 HelloTroy

What is the most precise you've tried? Also, what commit, and what Python version?

JSchwerberg avatar Aug 02 '16 20:08 JSchwerberg

Down to exactly what google says, python 2.7

HelloTroy avatar Aug 02 '16 20:08 HelloTroy

I had the error changing my location (since last commit few mins ago to include the new pgoapi), I used another precision (less accurate) and stopped working, I used this format, and it should work for you too:

"location": "43.3696709, -8.396026, 17"

Regards.

ghost avatar Aug 02 '16 20:08 ghost

Starting over with yungfrancis addition, will let you know!

HelloTroy avatar Aug 02 '16 20:08 HelloTroy

@yungfrancis You the man, what location is that?

WORKS.

HelloTroy avatar Aug 02 '16 20:08 HelloTroy

@HelloTroy haha, cheers bud, A Coruña, Spain ;)

ghost avatar Aug 02 '16 21:08 ghost

@yungfrancis what does the number 17 at the end mean?

zchen1018 avatar Aug 03 '16 03:08 zchen1018

@zchen1018 altitude

ghost avatar Aug 04 '16 11:08 ghost