UnicodeDecodeError: 'ascii' codec can't decode byte 0x9c in position 1: ordinal not in range(128)
See original GitHub issueExpected Behavior
Bot start
Actual Behavior
When starting bot I got this error
2016-08-07 13:17:38,327 [ cli] [INFO] PokemonGO Bot v1.0
2016-08-07 13:17:38,330 [ cli] [INFO] Configuration initialized
2016-08-07 13:17:38,330 [pokemongo_bot.health_record.bot_event] [INFO] Health check is enabled. For more logrmation:
2016-08-07 13:17:38,330 [pokemongo_bot.health_record.bot_event] [INFO] https://github.com/PokemonGoF/PokemonGo-Bot/tree/dev#analytics
2016-08-07 13:17:38,345 [requests.packages.urllib3.connectionpool] [INFO] Starting new HTTP connection (1): www.google-analytics.com
2016-08-07 13:17:40,746 [PokemonGoBot] [INFO] [set_start_location] Setting start location.
2016-08-07 13:17:40,746 [PokemonGoBot] [INFO] [x] Coordinates found in passed in location, not geocoding.
2016-08-07 13:17:40,747 [PokemonGoBot] [INFO] [location_found] Location found: 48.875776,2.3309463 (48.875776, 2.3309463, 0.0)
2016-08-07 13:17:40,747 [PokemonGoBot] [INFO] [position_update] Now at (48.875776, 2.3309463, 0)
2016-08-07 13:17:40,748 [PokemonGoBot] [INFO] [login_started] Login procedure started.
2016-08-07 13:17:46,564 [PokemonGoBot] [INFO] [login_successful] Login successful.
2016-08-07 13:17:47,675 [PokemonGoBot] [INFO]
2016-08-07 13:17:47,676 [PokemonGoBot] [INFO] --- <pokemonusername> ---
2016-08-07 13:17:47,676 [PokemonGoBot] [INFO] Level: XX (Next Level: 72115 XP) (Total: XXXXXXX XP)
2016-08-07 13:17:47,676 [PokemonGoBot] [INFO] Pokemon Captured: XXXX | Pokestops Visited: XXX
2016-08-07 13:17:47,677 [PokemonGoBot] [INFO] Pokemon Bag: XXX/250
2016-08-07 13:17:47,677 [PokemonGoBot] [INFO] Items: XXX/350
2016-08-07 13:17:47,677 [PokemonGoBot] [INFO] Stardust: XXXXXX | Pokecoins: 0
2016-08-07 13:17:47,678 [PokemonGoBot] [INFO] PokeBalls: XX | GreatBalls: 18 | UltraBalls: 100
2016-08-07 13:17:47,678 [PokemonGoBot] [INFO] RazzBerries: 40 | BlukBerries: 0 | NanabBerries: 0
2016-08-07 13:17:47,678 [PokemonGoBot] [INFO] LuckyEgg: 5 | Incubator: 0 | TroyDisk: 6
2016-08-07 13:17:47,678 [PokemonGoBot] [INFO] Potion: 0 | SuperPotion: 1 | HyperPotion: 2
2016-08-07 13:17:47,678 [PokemonGoBot] [INFO] Incense: 9 | IncenseSpicy: 0 | IncenseCool: 0
2016-08-07 13:17:47,678 [PokemonGoBot] [INFO] Revive: 40 | MaxRevive: 0
2016-08-07 13:17:47,678 [PokemonGoBot] [INFO]
2016-08-07 13:17:47,678 [PokemonGoBot] [INFO]
2016-08-07 13:17:47,696 [sentry.errors.serializer] [ERROR] maximum recursion depth exceeded while calling a Python object
Traceback (most recent call last):
File "/Users/<pokebotfolder>/pokebot/lib/python2.7/site-packages/raven/utils/serializer/manager.py", line 76, in transform
return repr(value)
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 383, in __getitem__
func = self._FuncPtr((name_or_ordinal, self))
RuntimeError: maximum recursion depth exceeded while calling a Python object
Traceback (most recent call last):
File "./pokecli.py", line 501, in <module>
main()
File "./pokecli.py", line 130, in main
report_summary(bot)
File "./pokecli.py", line 139, in report_summary
metrics.capture_stats()
File "/Users/<pokebotfolder>/pokebot/pokemongo_bot/metrics.py", line 76, in capture_stats
response_dict = request.call()
File "/Users/<pokebotfolder>/pokebot/pokemongo_bot/api_wrapper.py", line 106, in call
result = self._call()
File "/Users/<pokebotfolder>/pokebot/pokemongo_bot/api_wrapper.py", line 63, in _call
return PGoApiRequest.call(self)
File "/Users/<pokebotfolder>/pokebot/src/pgoapi/pgoapi/pgoapi.py", line 210, in call
request.activate_signature(lib_path)
File "/Users/<pokebotfolder>/pokebot/src/pgoapi/pgoapi/rpc_api.py", line 85, in activate_signature
self._signature_lib = ctypes.cdll.LoadLibrary(lib_path)
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 443, in LoadLibrary
return self._dlltype(name)
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 365, in __init__
self._handle = _dlopen(self._name, mode)
OSError: dlopen(encrypt.so, 6): image not found
2016-08-07 13:17:47,716 [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/<pokebotfolder>/pokebot/lib/python2.7/site-packages/raven/transport/threaded.py", line 174, in send_sync
super(ThreadedHTTPTransport, self).send(data, headers)
File "/Users/<pokebotfolder>/pokebot/lib/python2.7/site-packages/raven/transport/http.py", line 47, in send
ca_certs=self.ca_certs,
File "/Users/<pokebotfolder>/pokebot/lib/python2.7/site-packages/raven/utils/http.py", line 66, in urlopen
return opener.open(url, data, timeout)
File "/Users/<pokebotfolder>/pokebot/lib/python2.7/site-packages/future/backports/urllib/request.py", line 494, in open
response = self._open(req, data)
File "/Users/<pokebotfolder>/pokebot/lib/python2.7/site-packages/future/backports/urllib/request.py", line 512, in _open
'_open', req)
File "/Users/<pokebotfolder>/pokebot/lib/python2.7/site-packages/future/backports/urllib/request.py", line 466, in _call_chain
result = func(*args)
File "/Users/<pokebotfolder>/pokebot/lib/python2.7/site-packages/raven/utils/http.py", line 46, in https_open
return self.do_open(ValidHTTPSConnection, req)
File "/Users/<pokebotfolder>/pokebot/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.11/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.11/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.11/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.11/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)
2016-08-07 13:17:47,722 [sentry.errors.uncaught] [ERROR] [u'OSError: dlopen(encrypt.so, 6): image not found', u' File "pokecli.py", line 501, in <module>', u' File "pokecli.py", line 130, in main', u' File "pokecli.py", line 139, in report_summary', u' File "pokemongo_bot/metrics.py", line 76, in capture_stats', u' File "pokemongo_bot/api_wrapper.py", line 106, in call', u' File "pokemongo_bot/api_wrapper.py", line 63, in _call', u' File "pgoapi/pgoapi.py", line 210, in call', u' File "pgoapi/rpc_api.py", line 85, in activate_signature', u' File "ctypes/__init__.py", line 443, in LoadLibrary', u' File "ctypes/__init__.py", line 365, in __init__']
Steps to Reproduce
Other Information
OS: Git Commit: d5bb09fd758e779b8eee859d8374f0d198e58abb Python Version: Python 2.7.11
Issue Analytics
- State:
- Created 7 years ago
- Comments:15 (1 by maintainers)
Top Results From Across the Web
How to fix: "UnicodeDecodeError: 'ascii' codec can't decode ...
py", line 281, in convert source = unicode(source) UnicodeDecodeError: 'ascii' codec can't decode byte 0xe8 in position 1: ordinal not in range(128). --...
Read more >UnicodeDecodeError: 'ascii' codec can't decode byte
The Python "UnicodeDecodeError: 'ascii' codec can't decode byte in position" occurs when we use the ascii codec to decode bytes that were ...
Read more >UnicodeDecodeError: 'ascii' codec can't decode byte - Intellipaat
py", line 281, in convert source = unicode(source) UnicodeDecodeError: 'ascii' codec can't decode byte 0xe8 in position 1: ordinal not in range( ...
Read more >UnicodeDecodeError: 'ascii' codec can't decode byte - GitHub
StreamWriter): UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 1496: ordinal not in range(128)`.
Read more >'ascii' codec can't decode byte 0xc3 in position 27: ordinal not ...
Hi everyone;i'm trying to add constraints of unicity;i can show the message in the beginning but after 2 tests i show this message:...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
If the renaming doesnt work, too do this: in PokemonGo-Bot/pokemongo_bot edit the file
__init__.py
and replace thisself.api.activate_signature("encrypt.so")
with thisencrypt_path = os.path.abspath("./encrypt.so")
self.api.activate_signature(encrypt_path)
Regards@ErrorFlexXx @tomalbrc thanks alot to u 2
here a full fix
ok listen up what u have to do if u are on linnux or mac
Basically you need to rename the libencrypt.so file the makefile outputs to encrypt.so and copy it to your main folder
Run: wget http://pgoapi.com/pgoencrypt.tar.gz && tar -xf pgoencrypt.tar.gz && cd pgoencrypt/src/ && make && mv libencrypt.so encrypt.so
Then copy encrypt.so into your bots main folder.
if that does not work edit in PokemonGo-Bot/pokemongo_bot edit the file
__init__.py
and replace this self.api.activate_signature(“encrypt.so”) with this encrypt_path = os.path.abspath(“./encrypt.so”) self.api.activate_signature(encrypt_path) Regardslike i did here, i commet #self.api.activate_signature(“encrypt.so”) and add
encrypt_path = os.path.abspath(“./encrypt.so”) self.api.activate_signature(encrypt_path) http://image.prntscr.com/image/4fc363635d404637b6c3e797cfa13306.png