PokemonGo-Bot icon indicating copy to clipboard operation
PokemonGo-Bot copied to clipboard

UnicodeDecodeError: 'utf8' codec can't decode byte 0x9c in position 1: invalid start byte

Open davidspeijer opened this issue 10 years ago • 42 comments

Expected Behavior

Bot running.

Actual Behavior

Error message, see traceback below.

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

http://pastebin.com/5X1ZKz2x

Output when issue occurred

http://pastebin.com/M3xHmRmS

Steps to Reproduce

Run the bot

Other Information

OS: CentOS

Branch: latest dev

Git Commit: 9605728255f996f156fd00b1467d7f14afb1d3a4

Python Version: Python 2.7.5

Any other relevant files/configs (eg: path files)

davidspeijer avatar Aug 25 '16 09:08 davidspeijer

Getting the exact same error output.

balpoint avatar Aug 25 '16 09:08 balpoint

I hit into this and used VPN to resolve it. Looks like to me that my IP address was banned.

lwq008 avatar Aug 25 '16 10:08 lwq008

nope with different IP still gtting this erro.r

balpoint avatar Aug 25 '16 10:08 balpoint

same probleme

Billy2Kid avatar Aug 25 '16 11:08 Billy2Kid

same error. debian 8 box on google computing.

2016-08-25 14:04:07,100 [PokemonGoBot] [INFO] [login_started] Login procedure started. Traceback (most recent call last): File "pokecli.py", line 705, in <module> main() File "pokecli.py", line 187, in main report_summary(bot) File "pokecli.py", line 221, in report_summary metrics.capture_stats() File "/opt/PokemonGo-Bot/pokemongo_bot/metrics.py", line 102, in capture_stats response_dict = request.call() File "/opt/PokemonGo-Bot/pokemongo_bot/api_wrapper.py", line 239, in call result = self._call() File "/opt/PokemonGo-Bot/pokemongo_bot/api_wrapper.py", line 163, in _call accelerometer_axes=3 File "/opt/PokemonGo-Bot/local/lib/python2.7/site-packages/google/protobuf/internal/python_message.py", line 533, in init setattr(self, field_name, field_value) File "/opt/PokemonGo-Bot/local/lib/python2.7/site-packages/google/protobuf/internal/python_message.py", line 669, in field_setter new_value = type_checker.CheckValue(new_value) File "/opt/PokemonGo-Bot/local/lib/python2.7/site-packages/google/protobuf/internal/type_checkers.py", line 134, in CheckValue raise ValueError('Value out of range: %d' % proposed_value) ValueError: Value out of range: -146 2016-08-25 14:04:09,729 [sentry.errors] [ERROR] Sentry responded with an error: 'utf8' codec can't decode byte 0x9c in position 1: invalid start byte (url: https://app.getsentry.com/api/90254/store/) Traceback (most recent call last): File "/opt/PokemonGo-Bot/local/lib/python2.7/site-packages/raven/transport/threaded.py", line 174, in send_sync super(ThreadedHTTPTransport, self).send(data, headers) File "/opt/PokemonGo-Bot/local/lib/python2.7/site-packages/raven/transport/http.py", line 47, in send ca_certs=self.ca_certs, File "/opt/PokemonGo-Bot/local/lib/python2.7/site-packages/raven/utils/http.py", line 66, in urlopen return opener.open(url, data, timeout) File "/opt/PokemonGo-Bot/local/lib/python2.7/site-packages/future/backports/urllib/request.py", line 494, in open response = self._open(req, data) File "/opt/PokemonGo-Bot/local/lib/python2.7/site-packages/future/backports/urllib/request.py", line 512, in _open '_open', req) File "/opt/PokemonGo-Bot/local/lib/python2.7/site-packages/future/backports/urllib/request.py", line 466, in _call_chain result = func(*args) File "/opt/PokemonGo-Bot/local/lib/python2.7/site-packages/raven/utils/http.py", line 46, in https_open return self.do_open(ValidHTTPSConnection, req) File "/opt/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 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 File "/opt/PokemonGo-Bot/lib/python2.7/encodings/utf_8.py", line 16, in decode return codecs.utf_8_decode(input, errors, True) UnicodeDecodeError: 'utf8' codec can't decode byte 0x9c in position 1: invalid start byte 2016-08-25 14:04:09,731 [sentry.errors.uncaught] [ERROR] [u'ValueError: Value out of range: -146', u' File "pokecli.py", line 705, in <module>', u' File "pokecli.py", line 187, in main', u' File "pokecli.py", line 221, in report_summary', u' File "pokemongo_bot/metrics.py", line 102, in capture_stats', u' File "pokemongo_bot/api_wrapper.py", line 239, in call', u' File "pokemongo_bot/api_wrapper.py", line 163, in _call', u' File "/opt/PokemonGo-Bot/local/lib/python2.7/site-packages/google/protobuf/internal/python_message.py", line 533, in init', u' File "/opt/PokemonGo-Bot/local/lib/python2.7/site-packages/google/protobuf/internal/python_message.py", line 669, in field_setter', u' File "/opt/PokemonGo-Bot/local/lib/python2.7/site-packages/google/protobuf/internal/type_checkers.py", line 134, in CheckValue'] Thu Aug 25 14:04:09 UTC 2016 Pokebot Stopped.

UPDATE: seems rly like its an IP issue in my case. found out that this IP (google cloud computing) is banned - which makes sense to me lol ;)

HerrmannHinz avatar Aug 25 '16 14:08 HerrmannHinz

Same error on here. I fired up my VPN and changed IP's to no avail.

Baconnaise avatar Aug 25 '16 14:08 Baconnaise

Changing "health_record": true, to "health_record": false, took away some errors.

Now it is just:

Traceback (most recent call last): File "pokecli.py", line 705, in <module> main() File "pokecli.py", line 104, in main bot.start() File "/PokemonGo-Bot/pokemongo_bot/__init__.py", line 109, in start init_inventory(self) File "/PokemonGo-Bot/pokemongo_bot/inventory.py", line 1219, in init_inventory _inventory = Inventory(bot) File "/PokemonGo-Bot/pokemongo_bot/inventory.py", line 1086, in __init__ self.refresh() File "/PokemonGo-Bot/pokemongo_bot/inventory.py", line 1096, in refresh self.update_web_inventory() File "/PokemonGo-Bot/pokemongo_bot/inventory.py", line 1103, in update_web_inventory json_inventory = json.load(infile) File "/usr/lib64/python2.7/json/__init__.py", line 290, in load **kw) File "/usr/lib64/python2.7/json/__init__.py", line 338, in loads return _default_decoder.decode(s) File "/usr/lib64/python2.7/json/decoder.py", line 365, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib64/python2.7/json/decoder.py", line 381, in raw_decode obj, end = self.scan_once(s, idx) ValueError: Expecting object: line 1 column 6006 (char 6005)

Changing

{ 
         "type": "UpdateWebInventory",
         "config": {
            "enabled": true
         }
      },

To { "type": "UpdateWebInventory", "config": { "enabled": false } }, Doesnt change anything.

davidspeijer avatar Aug 25 '16 14:08 davidspeijer

@davidspeijer Do you have this file web/inventory-botname.json? If so - whats inside? Can you try to clear it?

sohje avatar Aug 25 '16 14:08 sohje

@sohje I don't have it.... and yes, same error as OP

r3pek avatar Aug 25 '16 14:08 r3pek

@r3pek could you please make file web/inventory-botname_here.json and try again?

sohje avatar Aug 25 '16 14:08 sohje

Clearing the file result in:

Traceback (most recent call last): File "pokecli.py", line 705, in main() File "pokecli.py", line 104, in main bot.start() File "/PokemonGo-Bot/pokemongo_bot/init.py", line 109, in start init_inventory(self) File "/PokemonGo-Bot/pokemongo_bot/inventory.py", line 1219, in init_inventory _inventory = Inventory(bot) File "/PokemonGo-Bot/pokemongo_bot/inventory.py", line 1086, in init self.refresh() File "/PokemonGo-Bot/pokemongo_bot/inventory.py", line 1096, in refresh self.update_web_inventory() File "/PokemonGo-Bot/pokemongo_bot/inventory.py", line 1103, in update_web_inventory json_inventory = json.load(infile) File "/usr/lib64/python2.7/json/init.py", line 290, in load **kw) File "/usr/lib64/python2.7/json/init.py", line 338, in loads return _default_decoder.decode(s) File "/usr/lib64/python2.7/json/decoder.py", line 365, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib64/python2.7/json/decoder.py", line 383, in raw_decode raise ValueError("No JSON object could be decoded") ValueError: No JSON object could be decoded

davidspeijer avatar Aug 25 '16 14:08 davidspeijer

Nop... same problem. Either with empty file or with empty JSON

2016-08-25 15:54:04,825 [PokemonGoBot] [INFO] Traceback (most recent call last): File "pokecli.py", line 705, in <module> main() File "pokecli.py", line 187, in main report_summary(bot) File "pokecli.py", line 221, in report_summary metrics.capture_stats() File "/root/PokemonGo-Bot/pokemongo_bot/metrics.py", line 102, in capture_stats response_dict = request.call() File "/root/PokemonGo-Bot/pokemongo_bot/api_wrapper.py", line 239, in call result = self._call() File "/root/PokemonGo-Bot/pokemongo_bot/api_wrapper.py", line 188, in _call return PGoApiRequest.call(self, signature) TypeError: call() takes exactly 1 argument (2 given) 2016-08-25 15:54:04,905 [sentry.errors] [ERROR] Sentry responded with an error: 'utf8' codec can't decode byte 0x9c in position 1: invalid start byte (url: https://app.getsentry.com/api/90254/store/) Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/raven/transport/threaded.py", line 174, in send_sync super(ThreadedHTTPTransport, self).send(data, headers) File "/usr/lib/python2.7/site-packages/raven/transport/http.py", line 47, in send ca_certs=self.ca_certs, File "/usr/lib/python2.7/site-packages/raven/utils/http.py", line 66, in urlopen return opener.open(url, data, timeout) File "/usr/lib/python2.7/site-packages/future/backports/urllib/request.py", line 494, in open response = self._open(req, data) File "/usr/lib/python2.7/site-packages/future/backports/urllib/request.py", line 512, in _open '_open', req) File "/usr/lib/python2.7/site-packages/future/backports/urllib/request.py", line 466, in _call_chain result = func(*args) File "/usr/lib/python2.7/site-packages/raven/utils/http.py", line 46, in https_open return self.do_open(ValidHTTPSConnection, req) File "/usr/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 File "/usr/lib/python2.7/encodings/utf_8.py", line 16, in decode return codecs.utf_8_decode(input, errors, True) UnicodeDecodeError: 'utf8' codec can't decode byte 0x9c in position 1: invalid start byte 2016-08-25 15:54:04,913 [sentry.errors.uncaught] [ERROR] [u'TypeError: call() takes exactly 1 argument (2 given)', u' File "pokecli.py", line 705, in <module>', u' File "pokecli.py", line 187, in main', u' File "pokecli.py", line 221, in report_summary', u' File "pokemongo_bot/metrics.py", line 102, in capture_stats', u' File "pokemongo_bot/api_wrapper.py", line 239, in call', u' File "pokemongo_bot/api_wrapper.py", line 188, in _call']

r3pek avatar Aug 25 '16 14:08 r3pek

Removing resulting in

Traceback (most recent call last): File "pokecli.py", line 705, in main() File "pokecli.py", line 104, in main bot.start() File "/PokemonGo-Bot/pokemongo_bot/init.py", line 109, in start init_inventory(self) File "/PokemonGo-Bot/pokemongo_bot/inventory.py", line 1219, in init_inventory _inventory = Inventory(bot) File "/PokemonGo-Bot/pokemongo_bot/inventory.py", line 1086, in init self.refresh() File "/PokemonGo-Bot/pokemongo_bot/inventory.py", line 1096, in refresh self.update_web_inventory() File "/PokemonGo-Bot/pokemongo_bot/inventory.py", line 1102, in update_web_inventory with open(web_inventory, "r") as infile: IOError: [Errno 2] No such file or directory: u'/PokemonGo-Bot/pokemongo_bot/../web/inventory-***.json'

davidspeijer avatar Aug 25 '16 14:08 davidspeijer

@davidspeijer @r3pek Could you put this into file?

[]

or

{}

Sorry, im not sure about this, just trying to help 👯

sohje avatar Aug 25 '16 14:08 sohje

@sohje same problem...

r3pek avatar Aug 25 '16 15:08 r3pek

@sohje {} solved it for me... :)

davidspeijer avatar Aug 25 '16 15:08 davidspeijer

@davidspeijer good ;]

sohje avatar Aug 25 '16 15:08 sohje

@davidspeijer changed anything else besides adding {} to the file?

r3pek avatar Aug 25 '16 15:08 r3pek

No, my original config is now working without any problems :).

davidspeijer avatar Aug 25 '16 15:08 davidspeijer

thx.... I open to ideas then ;) this is a fresh install...

r3pek avatar Aug 25 '16 15:08 r3pek