error: 'ascii' codec can't decode byte 0x9c in position 1: ordinal not in range
I keep getting ascii codec can't decode error. I've tried fixes in https://github.com/PokemonGoF/PokemonGo-Bot/issues/2686 and https://github.com/PokemonGoF/PokemonGo-Bot/issues/2776 but no luck.
Error Trace
2016-08-08 20:02:18,646 [ cli] [INFO] Most Perfect Pokemon:
Traceback (most recent call last):
File "pokecli.py", line 521, in <module>
main()
File "pokecli.py", line 95, in main
bot.tick()
File "/users/s6kalra/sources/PokemonGo-Bot/pokemongo_bot/__init__.py", line 446, in tick
if worker.work() == WorkerResult.RUNNING:
File "/users/s6kalra/sources/PokemonGo-Bot/pokemongo_bot/cell_workers/move_to_map_pokemon.py", line 237, in work
self.update_map_location()
File "/users/s6kalra/sources/PokemonGo-Bot/pokemongo_bot/cell_workers/move_to_map_pokemon.py", line 176, in update_map_location
return log.logger(err, 'red')
NameError: global name 'log' is not defined
2016-08-08 20:02:18,709 [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 "/users/s6kalra/sources/PokemonGo-Bot/bot/local/lib/python2.7/site-packages/raven/transport/threaded.py", line 174, in send_sync
super(ThreadedHTTPTransport, self).send(data, headers)
File "/users/s6kalra/sources/PokemonGo-Bot/bot/local/lib/python2.7/site-packages/raven/transport/http.py", line 47, in send
ca_certs=self.ca_certs,
File "/users/s6kalra/sources/PokemonGo-Bot/bot/local/lib/python2.7/site-packages/raven/utils/http.py", line 66, in urlopen
return opener.open(url, data, timeout)
File "/users/s6kalra/sources/PokemonGo-Bot/bot/local/lib/python2.7/site-packages/future/backports/urllib/request.py", line 494, in open
response = self._open(req, data)
File "/users/s6kalra/sources/PokemonGo-Bot/bot/local/lib/python2.7/site-packages/future/backports/urllib/request.py", line 512, in _open
'_open', req)
File "/users/s6kalra/sources/PokemonGo-Bot/bot/local/lib/python2.7/site-packages/future/backports/urllib/request.py", line 466, in _call_chain
result = func(*args)
File "/users/s6kalra/sources/PokemonGo-Bot/bot/local/lib/python2.7/site-packages/raven/utils/http.py", line 46, in https_open
return self.do_open(ValidHTTPSConnection, req)
File "/users/s6kalra/sources/PokemonGo-Bot/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 1001, in request
self._send_request(method, url, body, headers)
File "/usr/lib/python2.7/httplib.py", line 1035, in _send_request
self.endheaders(body)
File "/usr/lib/python2.7/httplib.py", line 997, in endheaders
self._send_output(message_body)
File "/usr/lib/python2.7/httplib.py", line 848, in _send_output
msg += message_body
UnicodeDecodeError: 'ascii' codec can't decode byte 0x9c in position 1: ordinal not in range(128)
Steps to Reproduce
- Checkout
devbranch. - Run Pokemongo map and use map config with proper end-point.
- Note It always happened on Most preferred pokemon step.
Other Information
OS: Linux Git Commit: 4b16e9da985e689d57beae8bf18878f4d872bdc4 Python Version: 2.7.9
Right now solving by setting update_map and health_record to false.
@shivamkalra I'm in master branch and this doesn't help.
CAn confirm @shivamkalra fix works!
Interesting i got again this problem after today norning git pull.... i try add: "health_record": false, "update_map": false, to config.json give me this:
Traceback (most recent call last):
File "pokecli.py", line 521, in
same as @takenek, but it will restart again and move on for a while then appear "ndexError: list index out of range" again.
Also make sure you run:
pip uninstall pgoapi && pip install -e git+https://github.com/keyphact/pgoapi.git#egg=pgoapi
So far I've not got this one.
I'm getting the same thing as @takenek and @denielchiang, as of latest pull today
After running your suggestion @shivamkalra still getting ascii errors:
2016-08-08 20:12:00,041 [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/)
@shivamkalra Thanks for your reply, after I did uninstall and install pgoapi, this happens... :(
2016-08-09 11:19:21,568 [ cli] [INFO] Ran for 0:02:08
2016-08-09 11:19:21,568 [ cli] [INFO] Total XP Earned: 680 Average: 19143.58/h
2016-08-09 11:19:21,568 [ cli] [INFO] Travelled 0.00km
2016-08-09 11:19:21,568 [ cli] [INFO] Visited 1 stops
2016-08-09 11:19:21,568 [ cli] [INFO] Encountered 2 pokemon, 3 caught, 2 released, 0 evolved, 0 never seen before
2016-08-09 11:19:21,568 [ cli] [INFO] Threw 3 pokeballs
2016-08-09 11:19:21,568 [ cli] [INFO] Earned 300 Stardust
2016-08-09 11:19:21,568 [ cli] [INFO]
2016-08-09 11:19:21,568 [ cli] [INFO] Highest CP Pokemon: Staryu [CP: 360] [IV: 13/2/0] Potential: 0.33
2016-08-09 11:19:21,569 [ cli] [INFO] Most Perfect Pokemon: Spearow [CP: 169] [IV: 11/2/8] Potential: 0.47
Traceback (most recent call last):
File "pokecli.py", line 521, in
I apparently got this issue on 2 out my 10-11 bots. But they started working again after 10 minutes rest. Not a great solution, but try for now.
This may not be for a regular user but I changed some of the code in rpc_api.py on pgoapi
try:
request_entry = subrequests_list[i]
except Exception as e:
print subrequests_list
self.log.info("Error - something strange happened... I don't know why")
continue
I think the api is being bombarded and results in an error. Not sure how this helps. I am going to observe this
@shivamkalra, i did nothing and just restarted it 15 mins ago and so far so good. I didn't see any error message appears again. Take a 10 min rest may really helped, thank you!
@franciszabala, I also added this part of log into roc_api.py and if this exception happens next time, i will observe this log...thanks :)
Now it becomes to this, but still works after auto-restart it...watching it now
2016-08-09 13:10:37,707 [ cli] [INFO] Most Perfect Pokemon: Goldeen [CP: 370] [IV: 13/13/11] Potential: 0.82
Traceback (most recent call last):
File "pokecli.py", line 521, in
After pull the newest version 6 hours ago it never happened again... Probably the problem is fixed in some version.
I still got this issue, can someone check this again?
2016-08-11 18:36:48,666 [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 "/usr/local/lib/python2.7/site-packages/raven/transport/threaded.py", line 174, in send_sync super(ThreadedHTTPTransport, self).send(data, headers) File "/usr/local/lib/python2.7/site-packages/raven/transport/http.py", line 47, in send ca_certs=self.ca_certs, File "/usr/local/lib/python2.7/site-packages/raven/utils/http.py", line 66, in urlopen return opener.open(url, data, timeout) File "/usr/local/lib/python2.7/site-packages/future/backports/urllib/request.py", line 494, in open response = self._open(req, data) File "/usr/local/lib/python2.7/site-packages/future/backports/urllib/request.py", line 512, in _open '_open', req) File "/usr/local/lib/python2.7/site-packages/future/backports/urllib/request.py", line 466, in _call_chain result = func(*args) File "/usr/local/lib/python2.7/site-packages/raven/utils/http.py", line 46, in https_open return self.do_open(ValidHTTPSConnection, req) File "/usr/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/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1057, in request self._send_request(method, url, body, headers) File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1097, in _send_request self.endheaders(body) File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1053, in endheaders self._send_output(message_body) File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/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)
I get it too since a master update (of yesterday changes)
Same here.. Was working til I did the latest update two days ago.. Any solution?