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

Endless loop of skipping recycling of Items.

Open OVO647 opened this issue 10 years ago • 7 comments

I have an endless loop of skipping recycling of items followed by code such as

Skipping Recycling of Items. 59 space left in bag. [14:27:37] Walking from () to () (70.2706450005 m) [14:27:37] {'distance_unit': '', 'distance': '', 'current_position': (), 'last_position': ()} [14:27:39] Skipping Recycling of Items. 59 space left in bag. [14:27:39] {'distance_unit': '', 'distance': '', 'current_position': (), 'last_position': ()}

OVO647 avatar Aug 11 '16 18:08 OVO647

same issue :(

I am using the latest version in dev branch

commit: 1bfabca76050742eefdbca79d9ba1279737c6219

robertpro avatar Aug 11 '16 18:08 robertpro

remove the "min_empty_space": 15, setting, it does only drop items when reaching the limit. So you can close the bug.

ghost avatar Aug 11 '16 18:08 ghost

It should be like this:

if self.min_empty_space is not None and free_bag_space >= self.min_empty_space and items_in_bag < total_bag_space:
            return

joaodragao avatar Aug 11 '16 18:08 joaodragao

@doctordo0m that is not the solution. That min_empty_space is a good thing to have to reduce the number of request it has to make, it's also more what a human would do

jimmywarting avatar Aug 11 '16 18:08 jimmywarting

I was speaking about his config.... What I want to say is, this is not a bug. It is intendet behaviour one gets for setting the min space.

ghost avatar Aug 11 '16 18:08 ghost

Each loop will output that when the task if ran and it hasn't reached the threshold to drop items. That's the intended behaviour.

DiegoRBaquero avatar Aug 11 '16 19:08 DiegoRBaquero

This is not intended behavior but a bug, since the bot does nothing except print out that message continuously. Removing "min_empty_space": 15 is a workaround but not a proper fix. Can you please look into the issue?

I noticed that when I added Max Revive to the list (possibly because of an increase in the # of items to keep) in my config.json, this issue can be reproduced.

My config.json currently contains the following, and I have not upgraded my items inventory.

      {
        "type": "RecycleItems",
        "config": {
          "min_empty_space": 15,
          "item_filter": {
            "Pokeball":       { "keep" : 10 },
            "Greatball":      { "keep" : 30 },
            "Ultraball":      { "keep" : 140 },
            "Potion":         { "keep" : 0 },
            "Super Potion":   { "keep" : 0 },
            "Hyper Potion":   { "keep" : 0 },
            "Max Potion":     { "keep" : 30 },
            "Revive":         { "keep" : 0 },
            "Max Revive":     { "keep" : 20 },
            "Razz Berry":     { "keep" : 30 }
          }
        }
      },

Looks like removing "min_empty_space": 15, running, stopping and adding back "min_empty_space": 15 fixes the issue. Seems to be a state bug.

pacpac42 avatar Aug 12 '16 11:08 pacpac42