PokemonGoF / PokemonGo-Bot

The Pokemon Go Bot, baking with community.
MIT License
3.87k stars 1.54k forks source link

Cant Sniping (Map location data was not valid) #3678

Closed fauzan-n closed 8 years ago

fauzan-n commented 8 years ago

### Expected Behavior Teleport to pokemon, encounter pokemon, teleport back and catch it.

### Actual Behavior Failure! Map location data was not valid2016-08-12 10:01:19,225 [ cli] [INFO] 2016-08-12 10:01:19,225 [ cli] [INFO] Ran for 0:00:12 2016-08-12 10:01:19,225 [ cli] [INFO] Total XP Earned: 0 Average: 0.00/h 2016-08-12 10:01:19,225 [ cli] [INFO] Travelled 0.00km 2016-08-12 10:01:19,226 [ cli] [INFO] Visited 0 stops 2016-08-12 10:01:19,226 [ cli] [INFO] Encountered 0 pokemon, 0 caught, 0 released, 0 evolved, 0 never seen before 2016-08-12 10:01:19,226 [ cli] [INFO] Threw 0 pokeballs 2016-08-12 10:01:19,226 [ cli] [INFO] Earned 0 Stardust 2016-08-12 10:01:19,226 [ cli] [INFO] 2016-08-12 10:01:19,226 [ cli] [INFO] Highest CP Pokemon: 2016-08-12 10:01:19,226 [ cli] [INFO] Most Perfect Pokemon: Traceback (most recent call last): File "pokecli.py", line 514, in main() File "pokecli.py", line 96, in main bot.tick() File "/home/f/PokemonGo-Bot/pokemongo_bot/init.py", line 468, in tick if worker.work() == WorkerResult.RUNNING: File "/home/f/PokemonGo-Bot/pokemongo_bot/cell_workers/move_to_map_pokemon.py", line 240, in work self.update_map_location() File "/home/f/PokemonGo-Bot/pokemongo_bot/cell_workers/move_to_map_pokemon.py", line 179, in update_map_location return log.logger(err, 'red') NameError: global name 'log' is not defined 2016-08-12 10:01:19,236 [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 "/home/f/.local/lib/python2.7/site-packages/raven/transport/threaded.py", line 174, in send_sync super(ThreadedHTTPTransport, self).send(data, headers) File "/home/f/.local/lib/python2.7/site-packages/raven/transport/http.py", line 47, in send ca_certs=self.ca_certs, File "/home/f/.local/lib/python2.7/site-packages/raven/utils/http.py", line 66, in urlopen return opener.open(url, data, timeout) File "/home/f/.local/lib/python2.7/site-packages/future/backports/urllib/request.py", line 494, in open response = self._open(req, data) File "/home/f/.local/lib/python2.7/site-packages/future/backports/urllib/request.py", line 512, in _open '_open', req) File "/home/f/.local/lib/python2.7/site-packages/future/backports/urllib/request.py", line 466, in _call_chain result = func(*args) File "/home/f/.local/lib/python2.7/site-packages/raven/utils/http.py", line 46, in https_open return self.do_open(ValidHTTPSConnection, req) File "/home/f/.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 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 UnicodeDecodeError: 'ascii' codec can't decode byte 0x9c in position 1: ordinal not in range(128) 2016-08-12 10:01:19,238 [sentry.errors.uncaught] [ERROR] [u"NameError: global name 'log' is not defined", u' File "pokecli.py", line 514, in ', u' File "pokecli.py", line 96, in main', u' File "pokemongo_bot/init.py", line 468, in tick', u' File "pokemongo_bot/cell_workers/move_to_map_pokemon.py", line 240, in work', u' File "pokemongo_bot/cell_workers/move_to_map_pokemon.py", line 179, in update_map_location'] Fri Aug 12 10:01:19 WIB 2016 Pokebot Stopped. Press any button or wait 20 seconds to continue.

### Your config.json (remove your credentials and any other private info)

{
    "auth_service": "google",
    "username": "username@gmail.com",
    "password": "password",
    "location": "22.296185, 114.174631",
    "gmapkey": "apikey",
    "libencrypt_location": "",
    "tasks": [
      {
        "type": "HandleSoftBan"
      },
      {
        "type": "CollectLevelUpReward"
      },
      {
        "type": "IncubateEggs",
        "config": {
          "longer_eggs_first": true
        }
      },
      {
        "type": "TransferPokemon"
      },
      {
        "type": "NicknamePokemon",
        "config": {
          "enabled": false,
          "nickname_template": "{iv_pct}_{iv_ads}"
        }
      },
      {
        "type": "EvolvePokemon",
        "config": {
            "evolve_all": "none",
            "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" : 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:8000",
          "max_distance": 500,
          "min_time": 60,
          "min_ball": 50,
          "prioritize_vips": true,
          "snipe": true,
          "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": 600,

            "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",
        "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"},
      "// Example of always releasing Rattata:": {}
    },
    "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": {}

    }
}

### Steps to Reproduce I Started the map with cd web/; python -m SimpleHTTPServer Then I started the bot ./run.sh and then got sniping error like that

### Other Information OS: Linux Mint 18 Sarah \n \l Git Commit: 0292c2f426b2432be70b0ca867fa62d8436cb5bf Python Version: Python 2.7.12

smfbrooks commented 8 years ago

Please read this

k4n30 commented 8 years ago

You're using the wrong map instance. You're trying to use the bot visualisation map (used to show the bots behaviour), rather than the PokemonGo-Map which scans for pokemon (to snipe).

Closing issue as it's not bot bug related. If you require assistance, feel free to join the slack server and join the #help channel