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

[Dev] catchable-<username>.json not updating

Open apremiumtypewriter opened this issue 10 years ago • 7 comments

Expected Behavior

web/catchable-.json gets updated when bot catches pokemon and map gets updated

Actual Behavior

web/catchable-.json reads: {}

Steps to Reproduce

Run bot

Other Information

OS: OS X Git Commit: c5483349e02fc0b1c8c8ed31411ae8ca71ec4177

apremiumtypewriter avatar Jul 29 '16 12:07 apremiumtypewriter

confirmed

GutZuFusss avatar Jul 29 '16 12:07 GutZuFusss

and then on the map nothing is shown.

not sure if its related, but also alerts are not displayed on web gui

matejvelikonja avatar Jul 29 '16 12:07 matejvelikonja

catchable-.json is updated and moment later its updated again with {}, so webmap does not have much time to read it. I think its reasonable to wait until devs release websocket version of the bot with same webmap - it`s so much better whan use AJAX to load jsons once a second.

mizhgan avatar Jul 29 '16 12:07 mizhgan

@mizhgan agreed.

apremiumtypewriter avatar Jul 29 '16 12:07 apremiumtypewriter

@mizhgan you are right. I'm watching the map a lot and only 1 time the map loaded a Pokemon for 1 Sec so its working good but the bot is too fast. Maybe it shouldn't show Pokemon he can catch maybe it should show Pokemon he did catch and which flee

Jojo1910 avatar Jul 29 '16 14:07 Jojo1910

if you change the order it works fine.

like so :
with open(user_web_catchable, 'w') as outfile: json.dump(pokemon, outfile)

            return_value = self.catch_pokemon(self.cell['catchable_pokemons'][0])

            with open(user_web_catchable, 'w') as outfile:
               json.dump({}, outfile)

            return return_value

its working fine with the web

talmachani avatar Jul 29 '16 14:07 talmachani

tested, magic! thanks

also i just saw be9e7bb79de33a7d177014184c510b2c60513be8 changed it. issue can be closed.

apremiumtypewriter avatar Jul 29 '16 14:07 apremiumtypewriter