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

Location-USERNAME.json not being updated

Open Drambuie opened this issue 10 years ago • 13 comments

Expected Behavior

web/location-USERNAME.json file should be updated

Actual Behavior

File is not being written too

Catchable and Items are being updated fine

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

{
    "auth_service": "google",
    "username": "######",
    "password": "######",
    "location": "######",
    "gmapkey": "######",
    "libencrypt_location": "/home/user/Pokemongo-Bot/",
    "tasks": [
      {
        "type": "HandleSoftBan"
      },
      {
        "type": "CollectLevelUpReward"
      },
      {
        "type": "IncubateEggs",
        "config": {
          "longer_eggs_first": true
        }
      },
      {
        "type": "TransferPokemon"
      },
      {
        "type": "EvolvePokemon",
        "config": {
            "evolve_all": "all",
            "first_evolve_by": "cp",
            "evolve_above_cp": 500,
            "evolve_above_iv": 0.8,
            "logic": "and",
            "evolve_speed": 20,
            "use_lucky_egg": true
        }
      },
      {
        "type": "RecycleItems",
        "config": {
            "item_filter": {
            "Pokeball":       { "keep" : 60 },
            "Greatball":      { "keep" : 75 },
        "Ultraball":        { "keep" : 125 },
            "Potion":         { "keep" : 0 },
            "Super Potion":   { "keep" : 0 },
            "Hyper Potion":   { "keep" : 0 },
        "Max Potion":     { "keep" : 0 },
            "Revive":         { "keep" : 0 },
            "Razz Berry":     { "keep" : 50 }
          }
        }
      },
      {
        "type": "CatchVisiblePokemon"
      },
      {
        "type": "CatchLuredPokemon"
      },
      {
        "type": "SpinFort"
      },
      {
        "type": "FollowPath",
        "config": {
          "path_mode": "loop",
          "path_file": "configs/path.######.json"
        }
      }
    ],
    "map_object_cache_time": 5,
    "forts": {
      "avoid_circles": true,
      "max_circle_size": 50
    },
    "websocket_server": false,
    "walk": 13.00,
    "action_wait_min": 1,
    "action_wait_max": 4,
    "debug": false,
    "test": false,
    "health_record": false,
    "location_cache": true,
    "distance_unit": "km",
    "reconnecting_timeout": 15,
    "evolve_captured": "Pidgey,Rattata,Weedle,Zubat",
    "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": { "keep_best_cp" : true, "keep_best_iv" : true, "logic": "or" },
      "// Example of always releasing Rattata:": {},
      "// Rattata": { "always_release" : true },
      "// Example of keeping stronger (based on CP) Pidgey:": {},
      "// Pidgey": { "keep_best_cp" : true },
      "// Example of keeping stronger (based on IV) Zubat:": {},
      "// Zubat": { "keep_best_iv" : true }
    },
    "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": {},
        "Charmander": {},
    "Bulbasaur": {},
    "Pikachu": {},
    "Squirtle":{},
    "Dratini": {},

        "// 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

above config, starting the bot

Other Information

OS:Ubuntu Git Commit: (run 'git log -n 1 --pretty=format:"%H"' and paste it here) Python Version: (run 'python -V' and paste it here)

Drambuie avatar Aug 10 '16 13:08 Drambuie

I can confirm the issue

tino-michael avatar Aug 10 '16 13:08 tino-michael

Have you create and setup the file PokemonGo-Bot/web/config/userdata.js ?

Fizcko avatar Aug 10 '16 13:08 Fizcko

I have. the initial position of the trainer is loaded and displayed on the map -- just not update during the run.

tino-michael avatar Aug 10 '16 13:08 tino-michael

Delete the PokemonGo-Bot/web/location-USERNAME.json file, he will be re-created automatically. Sometimes that fix the problem.

Fizcko avatar Aug 10 '16 13:08 Fizcko

Not updating location file anymore. https://github.com/PokemonGoF/PokemonGo-Bot/blob/dev/pokemongo_bot/init.py#L1008

vicch avatar Aug 10 '16 13:08 vicch

@vicch Nice one. But still don't understand why they disabled that handy feature.

wyhfrank avatar Aug 10 '16 13:08 wyhfrank

I heard it's because a new web UI based on websocket is being developed, as a result, old file-exporting method is being cut down.

vicch avatar Aug 10 '16 14:08 vicch

Is there an alternative way in the mean time?

Drambuie avatar Aug 10 '16 14:08 Drambuie

Just comment the pass and uncomment the rest of the function temporarily. When the new update comes out for the map, just git stash && git pull .

brochape avatar Aug 10 '16 14:08 brochape

After commenting pass and uncommenting while True: self.web_update_queue.get() self.update_web_location()

I receive this in terminal 127.0.0.1 - - [11/Aug/2016 01:15:13] code 400, message Bad HTTP/0.9 request type ('\x16\x03\x01\x00\xba\x01\x00\x00\xb6\x03\x03z\x01\xcd\xff\xecV\xe9\xb38f\xb4BH\xf9y') 127.0.0.1 - - [11/Aug/2016 01:15:13] "??z???V?8f?BH?y ?+????&?z??v??+?/̨̩?" 400 -

OSX: 10.11.6 Branch: Dev

JohnSkins avatar Aug 11 '16 08:08 JohnSkins

I'v removed the pass, uncommented the next lines and recompiled with 'python -m compileall'. And it works. Ubuntu 16.04 Branch: Dev

FranWatcher avatar Aug 11 '16 08:08 FranWatcher

I removed pass and uncommented the two lines and it works without recompiling anything

tino-michael avatar Aug 11 '16 09:08 tino-michael

fixed

k4n30 avatar Aug 16 '16 09:08 k4n30