Skip to content

Commit

Permalink
Fix For catchable not being displayed on the web (#2719)
Browse files Browse the repository at this point in the history
* Fix For catchable not being displayed on the web

* Update catch_visible_pokemon.py
  • Loading branch information
AcorpBG authored and elicwhite committed Aug 7, 2016
1 parent d5bb09f commit 420c1be
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pokemongo_bot/cell_workers/catch_visible_pokemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ def work(self):
key=
lambda x: distance(self.bot.position[0], self.bot.position[1], x['latitude'], x['longitude'])
)

user_web_catchable = 'web/catchable-{}.json'.format(self.bot.config.username)
for pokemon in self.bot.cell['catchable_pokemons']:
with open('user_web_catchable', 'w') as outfile:
with open(user_web_catchable, 'w') as outfile:
json.dump(pokemon, outfile)
self.emit_event(
'catchable_pokemon',
Expand Down

1 comment on commit 420c1be

@g0wfv
Copy link

@g0wfv g0wfv commented on 420c1be Aug 7, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works, but only if the catchable file pre-exists. if the catchable file doesn't exist in web, then you need to create it before anything displays.

Please sign in to comment.