Skip to content

Commit

Permalink
Fix for utf8 encoding when catching lured pokemon (#2720)
Browse files Browse the repository at this point in the history
* Fixing lure pokestop encoding

* fixing lure encoding
  • Loading branch information
dkim1000 authored and elicwhite committed Aug 7, 2016
1 parent e93431c commit d5bb09f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pokemongo_bot/cell_workers/catch_lured_pokemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ def get_lured_pokemon(self):
details = fort_details(self.bot, fort_id=fort['id'],
latitude=fort['latitude'],
longitude=fort['longitude'])
fort_name = details.get('name', 'Unknown').encode('utf8', 'replace')
fort_name = details.get('name', 'Unknown')

encounter_id = fort.get('lure_info', {}).get('encounter_id', None)

if encounter_id:
result = {
'encounter_id': encounter_id,
'fort_id': fort['id'],
'fort_name': fort_name,
'fort_name': u"{}".format(fort_name),
'latitude': fort['latitude'],
'longitude': fort['longitude']
}
Expand Down

0 comments on commit d5bb09f

Please sign in to comment.