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

Skipping Recycling of Items - Spam #3378

Closed
hYbridWY opened this issue Aug 10, 2016 · 8 comments
Closed

Skipping Recycling of Items - Spam #3378

hYbridWY opened this issue Aug 10, 2016 · 8 comments

Comments

@hYbridWY
Copy link

Constantly getting this.

[20:04:51] Moving towards Cubone, 0.21km, left (7 minutes, 51 seconds)
[20:04:52] Skipping Recycling of Items. 106 space left in bag.
[20:04:54] Moving towards Cubone, 0.19km, left (7 minutes, 48 seconds)
[20:04:56] Skipping Recycling of Items. 106 space left in bag.
[20:04:58] Moving towards Cubone, 0.18km, left (7 minutes, 44 seconds)
[20:04:59] Skipping Recycling of Items. 106 space left in bag.
[20:05:01] Moving towards Cubone, 0.16km, left (7 minutes, 41 seconds)
[20:05:03] Skipping Recycling of Items. 106 space left in bag.
[20:05:05] Moving towards Cubone, 0.15km, left (7 minutes, 37 seconds)
[20:05:07] Skipping Recycling of Items. 106 space left in bag.
[20:05:09] Moving towards Cubone, 0.13km, left (7 minutes, 33 seconds)
[20:05:10] Skipping Recycling of Items. 106 space left in bag.
[20:05:12] Moving towards Cubone, 0.11km, left (7 minutes, 30 seconds)
[20:05:13] Skipping Recycling of Items. 106 space left in bag.
[20:05:15] Moving towards Cubone, 0.10km, left (7 minutes, 27 seconds)
[20:05:16] Skipping Recycling of Items. 106 space left in bag.
[20:05:18] Moving towards Cubone, 0.08km, left (7 minutes, 24 seconds)
[20:05:20] Skipping Recycling of Items. 106 space left in bag.

Would be nice to keep this noise out of the cmd. =)

@RedViper9
Copy link
Contributor

RedViper9 commented Aug 10, 2016

I'm not seeing this text, but you could try Commenting out line 34 in PokemonGo-Bot/pokemongo_bot/cell_workers/recycle_items.py

formatted="Skipping Recycling of Items. {space} space left in bag.",

let me know how it goes.

@leadboots5
Copy link
Contributor

leadboots5 commented Aug 10, 2016

@RedViper9 You probably don't meet the condition to get that message.

@ConflictWY If you comment out just that line I'm gonna guess you'll get an error(or crash) every time you would get that text. You would likely need to comment out more than 1 line.

edit: apparently i guess in correctly.

@Ph4i1ur3
Copy link

Ph4i1ur3 commented Aug 10, 2016

An easy fix would probably be to change the line:
"if self.min_empty_space is not None:"
To
"if False:"
Edit - a quick fix, obviously. Needs rework

@RedViper9
Copy link
Contributor

@leadboots5 You're likely right about my not meeting the condition, but I commented out the equivalent line in catch_lured_pokemon.py and I no longer get the "Lured pokemon at fort XYZ Fort_ID" spam. No crashes yet.

If I'm reading the code right, the lines formatted="BLAH" send to the event logger and console output. This will mess with anything relying on the log handler, but the bot should still work fine.

@leadboots5
Copy link
Contributor

@RedViper9 My assumption was it would error(print out something less legible) or crash when it emitted the event and the format field was missing. Good to know it doesn't.

@RedViper9
Copy link
Contributor

@leadboots5 I believe it may have adverse effects on the webserver_socket_io which relies on the event handler, but I haven't tested that.

@Fizcko
Copy link

Fizcko commented Aug 10, 2016

To avoid flood on my console, i made the following changes :

File : pokemongo_bot/cell_workers/recycle_items.py
Line : 32

               """
                self.emit_event(
                    'item_discard_skipped',
                    formatted="Skipping Recycling of Items. {space} space left in bag.",
                    data={
                        'space': free_bag_space
                    }
                )
                """

Just comment the event by using """ (Multilline comment on Python 2.7)

@k4n30
Copy link
Contributor

k4n30 commented Aug 16, 2016

Fixed in new item recycling function

@k4n30 k4n30 closed this as completed Aug 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants