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

Sentry responded with an error: 'utf8' codec can't decode byte 0x9c #5037

Closed
gusterwoei opened this issue Sep 1, 2016 · 11 comments
Closed

Comments

@gusterwoei
Copy link

Expected Behavior

Bot starts as usual

Actual Behavior

After pulling the latest changes, the bot crashed on start and output some errors.

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

{
            "auth_service": "ptc",
            "username": "",
            "password": "",
            "location": "",
            "gmapkey": "",
            "libencrypt_location": "",
            "tasks": [{
                "type": "HandleSoftBan"
            }, {
                "type": "SleepSchedule",
                "config": {
                    "enabled": false,
                    "time": "22:54",
                    "duration": "7:46",
                    "time_random_offset": "00:24",
                    "duration_random_offset": "00:43"
                }
            }, {
                "type": "CollectLevelUpReward"
            }, {
                "type": "IncubateEggs",
                "config": {
                    "longer_eggs_first": true
                }
            }, {
                "type": "UpdateLiveStats",
                "config": {
                    "enabled": false,
                    "min_interval": 10,
                    "stats": ["uptime", "stardust_earned", "xp_earned", "xp_per_hour", "stops_visited"],
                    "terminal_log": true,
                    "terminal_title": true
                }
            }, {
                "type": "TransferPokemon"
            }, {
                "type": "NicknamePokemon",
                "config": {
                    "enabled": true,
                    "nickname_template": "{name}_{ivcp_pct2}"
                }
            }, {
                "type": "EvolvePokemon",
                "config": {
                    "evolve_all": "Pidgey,Weedle,Caterpie,Rattata,Zubat,Kakuna,Metapod",
                    "first_evolve_by": "cp",
                    "evolve_above_cp": 500,
                    "evolve_above_iv": 0.8,
                    "logic": "or",
                    "evolve_speed": 20,
                    "use_lucky_egg": false
                }
            }, {
                "type": "RecycleItems",
                "config": {
                    "min_empty_space": 15,
                    "item_filter": {
                        "Pokeball": {
                            "keep": 60
                        },
                        "Greatball": {
                            "keep": 50
                        },
                        "Ultraball": {
                            "keep": 30
                        },
                        "Potion": {
                            "keep": 70
                        },
                        "Super Potion": {
                            "keep": 20
                        },
                        "Hyper Potion": {
                            "keep": 30
                        },
                        "Revive": {
                            "keep": 30
                        },
                        "Razz Berry": {
                            "keep": 50
                        }
                    }
                }
            }, {
                "type": "CatchVisiblePokemon"
            }, {
                "type": "CatchLuredPokemon"
            }, {
                "type": "SpinFort"
            }, {
                "type": "MoveToFort",
                "config": {
                    "lure_attraction": true,
                    "lure_max_distance": 2000
                }
            }, {
                "type": "FollowSpiral",
                "config": {
                    "diameter": 4,
                    "step_size": 70
                }
            }],
            "map_object_cache_time": 5,
            "forts": {
                "avoid_circles": true,
                "max_circle_size": 50
            },
            "websocket_server": false,
            "walk": 4.16,
            "action_wait_min": 1,
            "action_wait_max": 4,
            "debug": false,
            "test": false,
            "health_record": true,
            "location_cache": true,
            "distance_unit": "km",
            "reconnecting_timeout": 15,
            "catch_randomize_reticle_factor": 1.0,
            "catch_randomize_spin_factor": 1.0,
            "logging_color": true,
            "catch": {
                "any": {
                    "catch_above_cp": 0,
                    "catch_above_iv": 0,
                    "logic": "or"
                },
                "// Example of always catching Rattata:": {},
                "// Rattata": {
                    "always_catch": true
                }
            },
            "release": {
                "any": {
                    "release_below_cp": 0,
                    "release_below_iv": 0,
                    "logic": "or"
                },
                "any": {
                    "keep_best_cp": 6,
                    "keep_best_iv": 1
                },
                "// Example of always releasing Rattata:": {},
                "//Rattata": {
                    "keep_best_cp": 1,
                    "keep_best_iv": 1
                },
                "// Example of keeping 2 stronger (based on IV) Zubat:": {},
                "//Zubat": {
                    "keep_best_cp": 1,
                    "keep_best_iv": 1
                },
                "//Golbat": {
                    "keep_best_cp": 2,
                    "keep_best_iv": 2
                },
                "//Metapod": {
                    "keep_best_cp": 1,
                    "keep_best_iv": 1
                },
                "//Kakuna": {
                    "keep_best_cp": 1,
                    "keep_best_iv": 1
                },
                "// Example of keeping 3 stronger (based on CP) Pidgey:": {},
                "// Pidgey": {
                    "keep_best_cp": 3
                },
                "// Also, it is working with any": {},
                "// any": {
                    "keep_best_iv": 3
                },
                "// Example of keeping the 2 strongest (based on CP) and 3 best (based on IV) Zubat:": {},
                "// Zubat": {
                    "keep_best_cp": 2,
                    "keep_best_iv": 3
                }
            },
            "vips": {
                "Any pokemon put here directly force to use Berry & Best Ball to capture, to secure the capture rate!": {},
                "any": {
                    "catch_above_cp": 1200,
                    "catch_above_iv": 0.9,
                    "logic": "or"
                },
                "Lapras": {},
                "Moltres": {},
                "Zapdos": {},
                "Articuno": {},

                "// S-Tier pokemons (if pokemon can be evolved into tier, list the representative)": {},
                "Mewtwo": {},
                "Dragonite": {},
                "Snorlax": {},
                "// Mew evolves to Mewtwo": {},
                "Mew": {},
                "Arcanine": {},
                "Vaporeon": {},
                "Gyarados": {},
                "Exeggutor": {},
                "Muk": {},
                "Weezing": {},
                "Flareon": {}

            }
        }

Output when issue occurred

2016-09-01 12:11:33,272 [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/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.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
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/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-09-01 12:11:33,631 [sentry.errors.uncaught] [ERROR] [u'TypeError: call() takes exactly 1 argument (2 given)', u' File "pokecli.py", line 781, in ', u' File "pokecli.py", line 217, in main', u' File "pokecli.py", line 265, in report_summary', u' File "pokemongo_bot/metrics.py", line 108, 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']

Steps to Reproduce

switch to master branch
do a git pull on master branch
run pip install -r requirements.txt
run ./run.sh

Other Information

OS:
OSX Yosemite

Branch:
master

Python Version:
2.7.11

Short Description

Possible solution

How it would help others

@dokhed
Copy link

dokhed commented Sep 1, 2016

Which program did you use to edit the config file?

@gusterwoei
Copy link
Author

I'm using Sublime

@Cptspal
Copy link

Cptspal commented Sep 1, 2016

According to this thread, your IP address may be banned : #4908
Do you have the possibility to test with another IP@ (through VPN, proxy or by tethering your mobile phone) ?

@gusterwoei
Copy link
Author

Hmm don't think so, I've changed my IP and still got the error

@sohje
Copy link
Contributor

sohje commented Sep 1, 2016

@gusterwoei try to pip install -r requirements.txt --upgrade

@Darkayer
Copy link

Darkayer commented Sep 1, 2016

Have you tried loggin in on the app with this account? It feels like a perma ban tbh.

@dokhed
Copy link

dokhed commented Sep 1, 2016

Try to separate single config.json file into auth.json and config.json

@gusterwoei
Copy link
Author

@sohje yup tried that too, doesn't work :(
@Darkayer I can login the app. In fact I can login via PokemonMap also, only the bot got this issue

@sohje
Copy link
Contributor

sohje commented Sep 1, 2016

pip freeze and show output

@gusterwoei
Copy link
Author

gusterwoei commented Sep 1, 2016

Solved it.
The problem is when I run pip install -r requirements.txt --upgrade
It's still using pgoapi-1.1.6

So later I tried to reset everything using ./setup.sh -r
Now it's using pgoapi-1.1.8, and the problem gone.

#4908

@sohje
Copy link
Contributor

sohje commented Sep 1, 2016

@mjmadsen Seems we have to check pgoapi version on bot start. That's causing lot of issues.

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

5 participants