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

RuntimeError: Pokemon Bag is full!

Open JPAntonisse opened this issue 10 years ago • 12 comments

This could be a duplicate issue. Sorry if that is the case

Error Callback

Traceback (most recent call last): File "pokecli.py", line 441, in main() File "pokecli.py", line 68, in main bot.tick() File "/home/joey/PokemonGo-Bot/pokemongo_bot/init.py", line 94, in tick if worker(self).work() == WorkerResult.RUNNING: File "/home/joey/PokemonGo-Bot/pokemongo_bot/cell_workers/catch_visible_pokemon_worker.py", line 35, in work return self.catch_pokemon(self.cell['catchable_pokemons'][0]) File "/home/joey/PokemonGo-Bot/pokemongo_bot/cell_workers/catch_visible_pokemon_worker.py", line 47, in catch_pokemon return_value = worker.work() File "/home/joey/PokemonGo-Bot/pokemongo_bot/cell_workers/pokemon_catch_worker.py", line 36, in work raise RuntimeError('Pokemon Bag is full!') RuntimeError: Pokemon Bag is full!

Expected Behavior

Bag is full

Actual Behavior

Steps to Reproduce

Other Information

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

JPAntonisse avatar Jul 30 '16 15:07 JPAntonisse

The bot is gonna error out every time the bag is full unless you set release parameters

WillM88 avatar Jul 30 '16 16:07 WillM88

I have this as well, in dev-branch. It happened today when after one of the commits it stopped releasing pokemon, it even has some CP 17 pidgeys it won't release.

I use the pokemon config file with very high standards, not sure why it suddenly stopped releasing the pokemons. The only commit I can see related to this is the one which stops the bot from releasing pokemons at forts, but have not verified anything or read through the code yet.

mattias avatar Jul 30 '16 17:07 mattias

@WillM88 I too get this error with set release parameters, much like @mattias - this isn't a simple code mistake, even search the error output in the issues section, this is a fairly new issue and a lot are experiencing it too.

AlexBailey avatar Jul 30 '16 17:07 AlexBailey

@AlexBailey Yea you're right, I just did a phone log in to check my inventory, there are lots of pokemon that are in there that should've been released.

WillM88 avatar Jul 30 '16 17:07 WillM88

Been looking through the code and found this commit and this code removed: https://github.com/PokemonGoF/PokemonGo-Bot/commit/b4af57437c219313daa7d5d2f761a491f175507d#diff-d81926cdea81e55e6b994231eda7f95dL39

Because of this it ends in a runtime error instead of just transfering pokemon like it used to in the catch worker. Still trying to figure out why it suddenly doesn't want to transfer pokemons at all according to the set release rules.

I don't know the code well enough yet to know if this is part of the issue, but it looks like it should try to release pokemons there instead of just exiting with a runtime error.

Edit: Debugging and the transfer worker sure fires each tick. Still not sure what's causing it not to release pokemons but will keep on debugging until I find the cause...

Edit: Found the cause here: https://github.com/PokemonGoF/PokemonGo-Bot/blob/dev/pokemongo_bot/cell_workers/pokemon_transfer_worker.py#L156 Which means, using the logic "and" it will fail if iv is True and cp is False. This will result in a "False" and the pokemon will not get released. I believe the idea in the configuration was that "and" meant that it would release if the pokemon was below both cp and iv.

Final Edit: Changing logic to "or" makes it stricter and matches so both cp and iv has to be above the set release rules. "and" seems to be catching too many with either high iv or high cp.

mattias avatar Jul 30 '16 18:07 mattias

I had the same issue. Then I looked in my config.json file and realized I had my release logic set like this "any": {"release_below_cp": 0, "release_below_iv": 0, "logic": "or"}.

enajork avatar Jul 31 '16 00:07 enajork

In which case this is my issue, however I have set individual pokemon below that different parameters, so if the 'any' parameters mattered, it surely would have got rid of the pokemon with individual parameters set?

AlexBailey avatar Jul 31 '16 13:07 AlexBailey

You have to think a little bit backwards when it comes to releasing. You want to use "or" to only keep the very best and not the default "and."

Say your target is 300 CP and 0.8 IV.

CP matches to True and IV matches to False on one pokemon.

With and it will not release the pokemon because it didn't match both, CP was above! With or it will release the pokemon because one of them matched.

Basically it will only release if both CP and IV are below using "and" making "or" more strict. I would have believed "or" was the intended default since this is a bot or you'd get a full inventory of Pokemon rather quickly. Same goes for the new "vip" funcionality, it should be "and" instead of "or" for "any" because otherwise it might get a cp 10 pokemon with IV of 0.9 or higher.

mattias avatar Jul 31 '16 16:07 mattias

@mattias mine is set to or "or" but still the same issue...

"release": { "any": {"release_below_cp": 0, "release_below_iv": 0, "logic": "or" },

followed by release parameters for individual pokemon, it's not even transferring once full unlike the master which I've now reverted to for the time being as that's what I'd rather it do - transfer when full

AlexBailey avatar Jul 31 '16 16:07 AlexBailey

@AlexBailey the any rule there will never release a pokemon since nothing can be below 0. You'd need to raise those to make it effective.

As for individual pokemon, are they set to "and" or "or"? The default configuration uses "and." I'd suggest changing them all to "or" and things should start working as expected again.

Edit: "any" basically means that rule will be used if you don't have a specific rule for an individual pokemon. For example, Dratini is not in the rules, so the bot keeps all Dratinis since "any" is set to 0 basically.

mattias avatar Jul 31 '16 17:07 mattias

@mattias Perfect, fixed it - thanks!

As for individual pokemon, are they set to "and" or "or"? The default configuration uses "and." I'd suggest changing them all to "or" and things should start working as expected again.

I also lost my Charizard immediately due to a messed up config :-( So sorta bitter sweet. I don't suppose you'd know if you can safely turn up the walk speed or anything else to increase xp per hour etc?

AlexBailey avatar Jul 31 '16 18:07 AlexBailey

@AlexBailey Here is my current config.json: https://gist.github.com/mattias/6f66c987a7dbfeb41b3f5b48a0caa138

I use a rather high speed and large max_step setting with no issues so far. The bot changes so fast you have to change the configuration at almost every update, but this is for commit 50303f81a2e6a7ad1da31558ead5ef636d3aa192

mattias avatar Aug 02 '16 10:08 mattias