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) #3905

Closed
j2kan opened this issue Aug 14, 2016 · 5 comments

Comments

@j2kan
Copy link

j2kan commented Aug 14, 2016

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

@abiran
Copy link

abiran commented Aug 14, 2016

I have the same issue.

[02:08:30] Login successful.2016-08-14 02:08:35,083 [pokemongo_bot.api_wrapper] [WARNING] Server seems to be busy or offline - try again - 4/15
2016-08-14 02:08:36,131 [pokemongo_bot.api_wrapper] [WARNING] Server seems to be busy or offline - try again - 5/15
2016-08-14 02:08:37,242 [pokemongo_bot.api_wrapper] [WARNING] Server seems to be busy or offline - try again - 6/15
2016-08-14 02:08:38,389 [pokemongo_bot.api_wrapper] [WARNING] Server seems to be busy or offline - try again - 7/15
2016-08-14 02:08:39,603 [pokemongo_bot.api_wrapper] [WARNING] Server seems to be busy or offline - try again - 8/15
2016-08-14 02:08:40,488 [pokemongo_bot.api_wrapper] [WARNING] Server seems to be busy or offline - try again - 9/15
2016-08-14 02:08:41,840 [pokemongo_bot.api_wrapper] [WARNING] Server seems to be busy or offline - try again - 10/15
2016-08-14 02:08:43,218 [pokemongo_bot.api_wrapper] [WARNING] Server seems to be busy or offline - try again - 11/15
2016-08-14 02:08:44,050 [pokemongo_bot.api_wrapper] [WARNING] Server seems to be busy or offline - try again - 12/15
2016-08-14 02:08:45,394 [pokemongo_bot.api_wrapper] [WARNING] Server seems to be busy or offline - try again - 13/15
2016-08-14 02:08:46,393 [pokemongo_bot.api_wrapper] [WARNING] Server seems to be busy or offline - try again - 14/15
2016-08-14 02:08:47,526 [pokemongo_bot.api_wrapper] [WARNING] Server seems to be busy or offline - try again - 15/15
Traceback (most recent call last):
File "pokecli.py", line 514, in
main()
File "pokecli.py", line 138, in main
report_summary(bot)
File "pokecli.py", line 147, in report_summary
metrics.capture_stats()
File "/root/PokemonGo-Bot/pokemongo_bot/metrics.py", line 84, in capture_stats
response_dict = request.call()
File "/root/PokemonGo-Bot/pokemongo_bot/api_wrapper.py", line 133, in call
raise ServerBusyOrOfflineException()
pgoapi.exceptions.ServerBusyOrOfflineException
2016-08-14 02:08:47,538 [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 "/root/PokemonGo-Bot/lib/python2.7/site-packages/raven/transport/threaded.py", line 174, in send_sync
super(ThreadedHTTPTransport, self).send(data, headers)
File "/root/PokemonGo-Bot/lib/python2.7/site-packages/raven/transport/http.py", line 47, in send
ca_certs=self.ca_certs,
File "/root/PokemonGo-Bot/lib/python2.7/site-packages/raven/utils/http.py", line 66, in urlopen
return opener.open(url, data, timeout)
File "/root/PokemonGo-Bot/lib/python2.7/site-packages/future/backports/urllib/request.py", line 494, in open
response = self._open(req, data)
File "/root/PokemonGo-Bot/lib/python2.7/site-packages/future/backports/urllib/request.py", line 512, in _open
'_open', req)
File "/root/PokemonGo-Bot/lib/python2.7/site-packages/future/backports/urllib/request.py", line 466, in _call_chain
result = func(*args)
File "/root/PokemonGo-Bot/lib/python2.7/site-packages/raven/utils/http.py", line 46, in https_open
return self.do_open(ValidHTTPSConnection, req)
File "/root/PokemonGo-Bot/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 "/root/.linuxbrew/Cellar/python/2.7.12_1/lib/python2.7/httplib.py", line 1057, in request
self._send_request(method, url, body, headers)
File "/root/.linuxbrew/Cellar/python/2.7.12_1/lib/python2.7/httplib.py", line 1097, in _send_request
self.endheaders(body)
File "/root/.linuxbrew/Cellar/python/2.7.12_1/lib/python2.7/httplib.py", line 1053, in endheaders
self._send_output(message_body)
File "/root/.linuxbrew/Cellar/python/2.7.12_1/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-14 02:08:47,541 [sentry.errors.uncaught] [ERROR] [u'ServerBusyOrOfflineException', u' File "pokecli.py", line 514, in ', u' File "pokecli.py", line 138, in main', u' File "pokecli.py", line 147, in report_summary', u' File "pokemongo_bot/metrics.py", line 84, in capture_stats', u' File "pokemongo_bot/api_wrapper.py", line 133, in call']

@bay1188
Copy link

bay1188 commented Aug 14, 2016

same. pretty much banned. Can't login from mobile app too.
tried other accounts both Bot and Apps works fine.

@foux
Copy link

foux commented Aug 14, 2016

I have the same issue when nicknaming Pokemons with a French locale.

@vdubus
Copy link
Contributor

vdubus commented Aug 14, 2016

I was also in the nicknaming pokemon task when his error occurred.
The selected locale was fr.

2016-08-14 10:25:11,815 [sentry.errors.serializer] [ERROR] 'ascii' codec can't encode character u'\xc9' in position 0: ordinal not in range(128)
Traceback (most recent call last):
  File "E:\Dev\Python27\lib\site-packages\raven\utils\serializer\manager.py", line 76, in transform
    return repr(value)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xc9' in position 0: ordinal not in range(128)
2016-08-14 10:25:11,823 [sentry.errors.serializer] [ERROR] 'ascii' codec can't encode character u'\xc9' in position 0: ordinal not in range(128)
Traceback (most recent call last):
  File "E:\Dev\Python27\lib\site-packages\raven\utils\serializer\manager.py", line 76, in transform
    return repr(value)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xc9' in position 0: ordinal not in range(128)
Traceback (most recent call last):
  File "./pokecli.py", line 578, in <module>
    main()
  File "./pokecli.py", line 103, in main
    bot.tick()
  File "E:\Dev\GitHub\PokemonGo-Bot\pokemongo_bot\__init__.py", line 482, in tick
    if worker.work() == WorkerResult.RUNNING:
  File "E:\Dev\GitHub\PokemonGo-Bot\pokemongo_bot\cell_workers\nickname_pokemon.py", line 204, in work
    self._nickname_pokemon(pokemon)
  File "E:\Dev\GitHub\PokemonGo-Bot\pokemongo_bot\cell_workers\nickname_pokemon.py", line 271, in _nickname_pokemon
    data={'old_name': old_nickname, 'current_name': new_nickname}
  File "E:\Dev\GitHub\PokemonGo-Bot\pokemongo_bot\base_task.py", line 28, in emit_event
    data=data
  File "E:\Dev\GitHub\PokemonGo-Bot\pokemongo_bot\event_manager.py", line 61, in emit
    formatted_msg = formatted.format(**data)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xc9' in position 4: ordinal not in range(128)
2016-08-14 10:25:11,875 [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 "E:\Dev\Python27\lib\site-packages\raven\transport\threaded.py", line 174, in send_sync
    super(ThreadedHTTPTransport, self).send(data, headers)
  File "E:\Dev\Python27\lib\site-packages\raven\transport\http.py", line 47, in send
    ca_certs=self.ca_certs,
  File "E:\Dev\Python27\lib\site-packages\raven\utils\http.py", line 66, in urlopen
    return opener.open(url, data, timeout)
  File "E:\Dev\Python27\lib\site-packages\future\backports\urllib\request.py", line 494, in open
    response = self._open(req, data)
  File "E:\Dev\Python27\lib\site-packages\future\backports\urllib\request.py", line 512, in _open
    '_open', req)
  File "E:\Dev\Python27\lib\site-packages\future\backports\urllib\request.py", line 466, in _call_chain
    result = func(*args)
  File "E:\Dev\Python27\lib\site-packages\raven\utils\http.py", line 46, in https_open
    return self.do_open(ValidHTTPSConnection, req)
  File "E:\Dev\Python27\lib\site-packages\future\backports\urllib\request.py", line 1284, in do_open
    h.request(req.get_method(), req.selector, req.data, headers)
  File "E:\Dev\Python27\lib\httplib.py", line 1057, in request
    self._send_request(method, url, body, headers)
  File "E:\Dev\Python27\lib\httplib.py", line 1097, in _send_request
    self.endheaders(body)
  File "E:\Dev\Python27\lib\httplib.py", line 1053, in endheaders
    self._send_output(message_body)
  File "E:\Dev\Python27\lib\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-14 10:25:11,930 [sentry.errors.uncaught] [ERROR] [u"UnicodeEncodeError: 'ascii' codec can't encode character u'\\xc9' in position 4: ordinal not in range(128)", u'  File "pokecli.py", line 578, in <module>', u'  File "pokecli.py", line 103, in main', u'  File "E:\\Dev\\GitHub\\PokemonGo-Bot\\pokemongo_bot\\__init__.py", line 482, in tick', u'  File "E:\\Dev\\GitHub\\PokemonGo-Bot\\pokemongo_bot\\cell_workers\\nickname_pokemon.py", line 204, in work', u'  File "E:\\Dev\\GitHub\\PokemonGo-Bot\\pokemongo_bot\\cell_workers\\nickname_pokemon.py", line 271, in _nickname_pokemon', u'  File "E:\\Dev\\GitHub\\PokemonGo-Bot\\pokemongo_bot\\base_task.py", line 28, in emit_event', u'  File "E:\\Dev\\GitHub\\PokemonGo-Bot\\pokemongo_bot\\event_manager.py", line 61, in emit']

My configuration was:

{
    "auth_service": "google",
    "username": "username",
    "password": "password",
    "location": "location",
    "gmapkey": "gmapkey",
    "encrypt_location": "",
    "tasks": [
      {
        "type": "HandleSoftBan"
      },
      {
        "type": "SleepSchedule",
        "config": {
          "enabled": true,
          "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": {
            "nickname_template": "{ivcp_pct}_{name}",
            "locale": "fr"
        }
      },
      {
        "type": "EvolvePokemon",
        "config": {
          "evolve_all": "NONE",
          "evolve_cp_min": 300,
          "evolve_speed": 20,
          "use_lucky_egg": false
        }
      },
      {
        "type": "RecycleItems",
        "config": {
          "min_empty_space": 15,
          "item_filter": {
            "Pokeball":       { "keep" : 100 },
            "Potion":         { "keep" : 10 },
            "Super Potion":   { "keep" : 20 },
            "Hyper Potion":   { "keep" : 30 },
            "Revive":         { "keep" : 30 },
            "Razz Berry":     { "keep" : 100 }
          }
        }
      },
      {
        "type": "CatchVisiblePokemon"
      },
      {
        "type": "CatchLuredPokemon"
      },
      {
        "type": "SpinFort"
      },
      {
        "type": "MoveToMapPokemon",
        "config": {
          "address": "http://localhost:5000",
          "max_distance": 500,
          "min_time": 60,
          "min_ball": 50,
          "prioritize_vips": true,
          "snipe": false,
          "snipe_high_prio_only": true,
          "snipe_high_prio_threshold": 400,
          "update_map": true,
          "mode": "priority",
          "map_path": "raw_data",
          "catch": {
            "==========Legendaries==========": 0,
            "Aerodactyl": 1000,
            "Snorlax": 1000,
            "Articuno": 1000,
            "Zapdos": 1000,
            "Moltres": 1000,
            "Dratini": 1000,
            "Dragonair": 1000,
            "Dragonite": 1000,
            "Mewtwo": 1000,
            "Mew": 1000,

            "==========Region Locked==========": 0,
            "Farfetch'd": 1000,
            "Kangaskhan": 1000,
            "Mr. Mime": 1000,
            "Tauros": 1000,

            "==========Very Rare==========": 0,
            "Lapras": 900,
            "Electabuzz": 900,
            "Magmar": 900,
            "Ditto": 900,

            "==========Starters==========": 0,
            "Bulbasaur": 400,
            "Ivysaur": 600,
            "Venusaur": 1000,

            "Charmander": 400,
            "Charmeleon": 600,
            "Charizard": 1000,

            "Squirtle": 400,
            "Wartortle": 600,
            "Blastoise": 1000,

            "Pikachu": 600,
            "Raichu": 1000,

            "==========Semi Rare==========": 0,
            "Porygon": 200,
            "Scyther": 200,
            "Jynx": 200,

            "==========Uncommon==========": 0,

            "Omanyte": 150,
            "Omastar": 500,

            "Seel": 300,
            "Dewgong": 500,

            "Grimer": 200,
            "Muk": 500,

            "Shellder": 200,
            "Cloyster": 500,

            "Gastly": 200,
            "Haunter": 500,
            "Gengar": 1000,

            "Onix": 600,

            "Drowzee": 100,

            "Hypno": 600,

            "Vulpix": 200,
            "Ninetales": 600,

            "Paras": 100,
            "Parasect": 500,

            "Growlithe": 200,
            "Arcanine": 700,

            "Tentacool": 200,
            "Tentacruel": 500,

            "Mankey": 150,
            "Primeape": 500,

            "Clefairy": 150,
            "Clefable": 500,

            "Jigglypuff": 150,
            "Wigglytuff": 500,

            "Venonat": 100,
            "Venomoth": 500,

            "Diglett": 200,
            "Dugtrio": 500,

            "Meowth": 250,
            "Persian": 500,

            "Psyduck": 150,
            "Golduck": 500,

            "Geodude": 100,
            "Graveler": 500,
            "Golem": 800,

            "Eevee": 200,
            "Vaporeon": 800,
            "Jolteon": 800,
            "Flareon": 800,

            "Kabuto": 150,
            "Kabutops": 500,

            "Magikarp": 150,
            "Gyarados": 800,

            "Pinsir": 150,

            "Ponyta": 200,
            "Rapidash": 500,

            "Slowpoke": 200,
            "Slowbro": 500,

            "Magnemite": 250,
            "Magneton": 500,

            "Krabby": 100,
            "Kingler": 500,

            "Voltorb": 200,
            "Electrode": 500,

            "Exeggcute": 250,
            "Exeggcutor": 500,

            "Cubone": 300,
            "Marowak": 800,

            "Hitmonlee": 400,

            "Hitmonchan": 400,

            "Lickitung": 500,

            "Koffing": 200,
            "Weezing": 500,

            "Rhyhorn": 200,
            "Rhydon": 500,

            "Chansey": 800,

            "Tangela": 300,

            "Horsea": 200,
            "Seadra": 600,

            "Goldeen": 150,
            "Seaking": 500,

            "Staryu": 200,
            "Starmie": 800,


            "==========T1 Evolvers==========": 0,
            "Caterpie": 10,
            "Metapod": 10,
            "Butterfree": 500,

            "Weedle": 10,
            "Kakuna": 10,
            "Beedrill": 500,

            "Pidgey": 10,
            "Pidgeotto": 10,
            "Pidgeot": 300,

            "==========T2 Evolvers==========": 0,
            "Nidoran F": 10,
            "Nidorina": 10,
            "Nidoqueen": 10,

            "Nidoran M": 10,
            "Nidorino": 10,
            "Nidoking": 10,

            "Oddish": 100,
            "Gloom": 200,
            "Vileplume": 600,

            "Poliwag": 200,
            "Poliwhirl": 400,
            "Poliwrath": 800,

            "Abra": 300,
            "Kadabra": 600,
            "Alakazam": 800,

            "Machop": 150,
            "Machoke": 400,
            "Machamp": 800,

            "Bellsprout": 100,
            "Weepinbell": 400,
            "Victreebel": 800,

            "==========Trash==========": 0,

            "Rattata": 10,
            "Raticate": 10,

            "Spearow": 10,
            "Fearow": 10,

            "Ekans": 10,
            "Arbok": 10,

            "Sandshrew": 10,
            "Sandslash": 10,

            "Zubat": 10,
            "Golbat": 10,

            "Doduo": 10,
            "Dodrio": 10
          }
        }
      },
      {
        "type": "MoveToFort"
      },
      {
        "type": "FollowSpiral"
      }
    ],
    "map_object_cache_time": 5,
    "forts": {
      "avoid_circles": true,
      "max_circle_size": 50
    },
    "websocket_server": false,
    "walk": 6.24,
    "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,
    "min_ultraball_to_keep": 10,
    "logging_color": true,
    "catch": {
      "any": {"catch_above_cp": 0, "catch_above_iv": 0, "logic": "or"},
      "// Example of always catching Rattata:": {},
      "// Rattata": { "always_catch" : true }
    },
    "catch_throw_parameters": {
      "excellent_rate": 0.1,
      "great_rate": 0.5,
      "nice_rate": 0.3,
      "normal_rate": 0.1,
      "spin_success_rate" : 0.6
    },
    "release": {
      "any": {"keep_best_iv": 1, "keep_best_cp": 1},
      "// Example of always releasing Rattata:": {},
      "// Rattata": {"always_release": true},
      "// Example of keeping 3 stronger (based on CP) Pidgey:": {},
      "// Pidgey": {"keep_best_cp": 3},
      "// Example of keeping 2 stronger (based on IV) Zubat:": {},
      "// Zubat": {"keep_best_iv": 2},
      "// 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": {}
    }
}

@k4n30
Copy link
Contributor

k4n30 commented Aug 14, 2016

@j2kan - can you please use the issue template so that we can help you, we need to full output, not just one line. Going to close this issue, so that you can recreate it with the right detail :)
@abiran - your issue is ban related
@ foux & @vdubus - Can one you create an issue for the fr locale nickname issue so that it can be looked at rather than just hijacking other similar issues which your problem is not related to

@k4n30 k4n30 closed this as completed Aug 14, 2016
@PokemonGoF PokemonGoF locked and limited conversation to collaborators Aug 14, 2016
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

6 participants