Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnicodeDecodeError: 'ascii' codec can't decode byte 0x9c in position 1: ordinal not in range(128) #6026

Closed
Fronty72 opened this issue Apr 23, 2017 · 3 comments

Comments

@Fronty72
Copy link

Fronty72 commented Apr 23, 2017

Expected Behavior

Running PokemonGo-Bot with default config

Actual Behavior

Stuck at error "UnicodeDecodeError: 'ascii' codec can't decode byte 0x9c in position 1: ordinal not in range(128)"

Your FULL config.json (remove your username, password, gmapkey and any other private info)

Didn't change anything to default config.json as supplied in package.

Output when issue occurred

2017-04-23 11:39:48,354 [ cli] [INFO] PokemonGO Bot v1.0
2017-04-23 11:39:48,360 [ cli] [INFO] commit: 263da69
2017-04-23 11:39:48,365 [ cli] [INFO] Configuration initialized
2017-04-23 11:39:48,365 [pokemongo_bot.health_record.bot_event] [INFO] Health check is enabled. For more information:
2017-04-23 11:39:48,365 [pokemongo_bot.health_record.bot_event] [INFO] https://github.com/PokemonGoF/PokemonGo-Bot/tree/dev#analytics
2017-04-23 11:39:48,372 [requests.packages.urllib3.connectionpool] [INFO] Starting new HTTP connection (1): www.google-analytics.com
(22464) wsgi starting up on http://127.0.0.1:4000
[2017-04-23 11:39:48] [SleepSchedule] [INFO] Next sleep at 18:42:06, for a duration of 03:12:52
[2017-04-23 11:39:48] [PokemonGoBot] [INFO] Setting start location.
Traceback (most recent call last):
File "/home/fronty/Desktop/PokemonGo-Bot/local/lib/python2.7/site-packages/eventlet/hubs/hub.py", line 457, in fire_timers
timer()
File "/home/fronty/Desktop/PokemonGo-Bot/local/lib/python2.7/site-packages/eventlet/hubs/timer.py", line 58, in call
cb(*args, **kw)
File "/home/fronty/Desktop/PokemonGo-Bot/local/lib/python2.7/site-packages/eventlet/green/thread.py", line 41, in __thread_body
func(*args, **kwargs)
File "/home/fronty/Desktop/PokemonGo-Bot/pokemongo_bot/event_handlers/social_handler.py", line 86, in run
self._mqttc.connect("broker.pikabot.org", 1883, 20)
File "/home/fronty/Desktop/PokemonGo-Bot/local/lib/python2.7/site-packages/paho/mqtt/client.py", line 686, in connect
return self.reconnect()
File "/home/fronty/Desktop/PokemonGo-Bot/local/lib/python2.7/site-packages/paho/mqtt/client.py", line 808, in reconnect
sock = socket.create_connection((self._host, self._port), source_address=(self._bind_address, 0))
File "/home/fronty/Desktop/PokemonGo-Bot/local/lib/python2.7/site-packages/eventlet/green/socket.py", line 44, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
gaierror: [Errno -5] No address associated with hostname
[2017-04-23 11:39:50] [PokemonGoBot] [INFO] Location found: ...
[2017-04-23 11:39:50] [PokemonGoBot] [INFO] Now at ....
[2017-04-23 11:39:50] [PokemonGoBot] [INFO] Login procedure started.
[2017-04-23 11:39:54] [PokemonGoBot] [INFO] Login successful.
[2017-04-23 11:39:54] [PokemonGoBot] [INFO] Niantic Official API Version: 0.61.0
[2017-04-23 11:39:54] [PokemonGoBot] [INFO] Latest Bossland Hashing API Version: 0.61.0
[2017-04-23 11:39:55] [PokemonGoBot] [INFO] Captcha Check Passed
[2017-04-23 11:39:55] [PokemonGoBot] [INFO]
[2017-04-23 11:39:55] [PokemonGoBot] [INFO] [x] Error while opening cached forts: [Errno 2] No such file or directory: u'/home/fronty/Desktop/PokemonGo-Bot/pokemongo_bot/../data/recent-forts-email@gmail.com.json'
[2017-04-23 11:39:55] [PokemonGoBot] [INFO] Level: 2 (Next Level: 280 XP) (Total: 2720 XP)
[2017-04-23 11:39:55] [PokemonGoBot] [INFO] Pokemon Captured: 5 | Pokestops Visited: 0
[2017-04-23 11:39:57] [PokemonGoBot] [INFO]
[2017-04-23 11:39:57] [PokemonGoBot] [INFO] --- JPWI2110 ---
[2017-04-23 11:39:57] [PokemonGoBot] [INFO] Pokemon Bag: 5/250
[2017-04-23 11:39:57] [PokemonGoBot] [INFO] Items: 59/350
[2017-04-23 11:39:57] [PokemonGoBot] [INFO] Stardust: 1100 | Pokecoins: 0
[2017-04-23 11:39:57] [PokemonGoBot] [INFO] PokeBalls: 55 | GreatBalls: 0 | UltraBalls: 0 | MasterBalls: 0
[2017-04-23 11:39:57] [PokemonGoBot] [INFO] RazzBerries: 0 | Nanab Berries: 0 | Pinap Berries: 0
[2017-04-23 11:39:57] [PokemonGoBot] [INFO] LuckyEgg: 0 | Incubator: 0 | TroyDisk: 0
[2017-04-23 11:39:57] [PokemonGoBot] [INFO] Potion: 0 | SuperPotion: 0 | HyperPotion: 0 | MaxPotion: 0
[2017-04-23 11:39:57] [PokemonGoBot] [INFO] Incense: 2 | IncenseSpicy: 0 | IncenseCool: 0
[2017-04-23 11:39:57] [PokemonGoBot] [INFO] Revive: 0 | MaxRevive: 0
[2017-04-23 11:39:57] [PokemonGoBot] [INFO] Sun Stone: 0 | Kings Rock: 0 | Metal Coat: 0 | Dragon Scale: 0 | Upgrade: 0
[2017-04-23 11:39:57] [PokemonGoBot] [INFO]
[2017-04-23 11:39:57] [PokemonGoBot] [INFO] Pokemon:
[2017-04-23 11:39:57] [PokemonGoBot] [INFO] #1 Bulbasaur: (CP 12, IV 0.67)
[2017-04-23 11:39:57] [PokemonGoBot] [INFO] #81 Magnemite: (CP 44, IV 0.64) | (CP 13, IV 0.53)
[2017-04-23 11:39:57] [PokemonGoBot] [INFO] #100 Voltorb: (CP 10, IV 0.44) | (CP 10, IV 0.56)
[2017-04-23 11:39:57] [PokemonGoBot] [INFO]
[2017-04-23 11:39:57] [RandomAlivePause] [INFO] Next random alive pause at 12:04:03, for a duration of 0:03:34
[2017-04-23 11:39:57] [RandomPause] [INFO] Next random pause at 12:37:23, for a duration of 0:02:41
[2017-04-23 11:39:57] [RecycleItems] [INFO] Next forced item recycle at 11:43:44
[2017-04-23 11:39:57] [pokemongo_bot.health_record.bot_event] [INFO] Health check is enabled. For more information:
[2017-04-23 11:39:57] [pokemongo_bot.health_record.bot_event] [INFO] https://github.com/PokemonGoF/PokemonGo-Bot/tree/dev#analytics
[2017-04-23 11:39:57] [PokemonGoBot] [INFO] Starting bot...
[2017-04-23 11:39:58] [CollectLevelUpReward] [INFO] Received level up reward:
[2017-04-23 11:39:59] [ cli] [INFO]
[2017-04-23 11:39:59] [ cli] [INFO] Ran for 0:00:11
[2017-04-23 11:39:59] [ cli] [INFO] Total XP Earned: 0 Average: 0.00/h
[2017-04-23 11:39:59] [ cli] [INFO] Travelled 0.00km
[2017-04-23 11:39:59] [ cli] [INFO] Visited 0 stops
[2017-04-23 11:39:59] [ cli] [INFO] Encountered 0 pokemon, 0 caught, 0 released, 0 evolved, 0 never seen before ()
[2017-04-23 11:39:59] [ cli] [INFO] Threw 0 pokeballs
[2017-04-23 11:39:59] [ cli] [INFO] Earned 0 Stardust
[2017-04-23 11:39:59] [ cli] [INFO] Hatched eggs 0
[2017-04-23 11:39:59] [ cli] [INFO]
[2017-04-23 11:39:59] [ cli] [INFO] Highest CP Pokemon:
[2017-04-23 11:39:59] [ cli] [INFO] Most Perfect Pokemon:
Traceback (most recent call last):
File "pokecli.py", line 865, in
main()
File "pokecli.py", line 206, in main
bot.tick()
File "/home/fronty/Desktop/PokemonGo-Bot/pokemongo_bot/init.py", line 785, in tick
if worker.work() == WorkerResult.RUNNING:
File "/home/fronty/Desktop/PokemonGo-Bot/pokemongo_bot/cell_workers/buddy_pokemon.py", line 135, in work
if self._km_walked() - self.buddy['last_km_awarded'] >= self.buddy_distance_needed:
KeyError: 'last_km_awarded'
[2017-04-23 11:39:59] [sentry.errors] [ERROR] Sentry responded with an error: 'ascii' codec can't decode byte 0x9c in position 1: ordinal not in range(128) (url: https://app.getsentry.com/api/90254/store/)
Traceback (most recent call last):
File "/home/fronty/Desktop/PokemonGo-Bot/local/lib/python2.7/site-packages/raven/transport/threaded.py", line 174, in send_sync
super(ThreadedHTTPTransport, self).send(data, headers)
File "/home/fronty/Desktop/PokemonGo-Bot/local/lib/python2.7/site-packages/raven/transport/http.py", line 47, in send
ca_certs=self.ca_certs,
File "/home/fronty/Desktop/PokemonGo-Bot/local/lib/python2.7/site-packages/raven/utils/http.py", line 66, in urlopen
return opener.open(url, data, timeout)
File "/home/fronty/Desktop/PokemonGo-Bot/local/lib/python2.7/site-packages/future/backports/urllib/request.py", line 494, in open
response = self._open(req, data)
File "/home/fronty/Desktop/PokemonGo-Bot/local/lib/python2.7/site-packages/future/backports/urllib/request.py", line 512, in _open
'_open', req)
File "/home/fronty/Desktop/PokemonGo-Bot/local/lib/python2.7/site-packages/future/backports/urllib/request.py", line 466, in _call_chain
result = func(*args)
File "/home/fronty/Desktop/PokemonGo-Bot/local/lib/python2.7/site-packages/raven/utils/http.py", line 46, in https_open
return self.do_open(ValidHTTPSConnection, req)
File "/home/fronty/Desktop/PokemonGo-Bot/local/lib/python2.7/site-packages/future/backports/urllib/request.py", line 1284, in do_open
h.request(req.get_method(), req.selector, req.data, headers)
File "/usr/lib/python2.7/httplib.py", line 1057, in request
self._send_request(method, url, body, headers)
File "/usr/lib/python2.7/httplib.py", line 1097, in _send_request
self.endheaders(body)
File "/usr/lib/python2.7/httplib.py", line 1053, in endheaders
self._send_output(message_body)
File "/usr/lib/python2.7/httplib.py", line 895, in _send_output
msg += message_body
UnicodeDecodeError: 'ascii' codec can't decode byte 0x9c in position 1: ordinal not in range(128)
[2017-04-23 11:39:59] [sentry.errors.uncaught] [ERROR] [u"KeyError: 'last_km_awarded'", u' File "pokecli.py", line 865, in ', u' File "pokecli.py", line 206, in main', u' File "pokemongo_bot/init.py", line 785, in tick', u' File "pokemongo_bot/cell_workers/buddy_pokemon.py", line 135, in work']

Steps to Reproduce

run ./run.sh

Other Information

OS: Linux Mint
Branch: Master
Git Commit: 263da69
Python Version: Python 2.7.12

@Jcolomar
Copy link
Contributor

if self._km_walked() - self.buddy['last_km_awarded'] >= self.buddy_distance_needed:
KeyError: 'last_km_awarded'

The problems seems about buddy. Try disable buddy task and run bot

@Jcolomar Jcolomar reopened this Apr 23, 2017
@Fronty72
Copy link
Author

Fronty72 commented Apr 25, 2017

Thanks, this seems to work. Testing it now, no errors

Changed in config.json

   ` "type": "BuddyPokemon","config": {"enabled": true,`

to
"type": "BuddyPokemon","config": {"enabled": false,

@Jcolomar
Copy link
Contributor

Np. Closed #6026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants