Coordinates
Hi,
Why is the coordinates showing in the terminal ?
Moving towards pokestop Valberg Tower Valbergstårnet - 0.07km [17:42:48] {'distance_unit': '', 'distance': '', 'current_position': (58.97230424031362, 5.730717359423945), 'last_position': (58.97242817036925, 5.730551884795199)}
OSX
Woud be nice if this could be an option in the config, this create's big logs with data most of the poeple don't need to see.
i suspect someone just left a debugging message in their code when they committed
#3431
@nearalias Its still showing the message even if the debug is false

With the latest dev version it's still shows me the coordinates.
It's because a bug in the step_walker.py
In the line 58 the method bot.event_manager.emit() is called without the formatted param.
` self.bot.event_manager.emit(
'position_update',
sender=self,
level='debug',
data={
'current_position': (cLat, cLng),
'last_position': (self.initLat, self.initLng),
'distance': '',
'distance_unit': ''
}
)
`
And it should be something like:
` self.bot.event_manager.emit(
'position_update',
sender=self,
level='debug',
formatted="Distance {distance}",
data={
'current_position': (cLat, cLng),
'last_position': (self.initLat, self.initLng),
'distance': self.dist,
'distance_unit': ''
}
)
`
Changing this to the above results in an terminal log line with "Distance" with nothing else behind it. But the distance itself is already logged in the line above. So the whole line should not be there.
[11:41:03] Moving towards pokestop xxxxxxxxxxxxxx - 0.08km
[11:41:03] Distance
It depends on the type of walker task you are running. I guess you're running a "MoveToFort" walker and that's because you're already getting the distance info. I'm using a "FollowPath" and it's thankful some feedback. But you're right, you can comment the method bot.event_manager.emit() calling.
i changed as suggested, to this
self.bot.event_manager.emit(
'position_update',
sender=self,
level='debug',
formatted="Distance: {distance}",
data={
'current_position': (cLat, cLng),
'last_position': (self.initLat, self.initLng),
'distance': self.dist,
'distance_unit': ''
}
)
i got this result,
[17:48:00] Moving towards pokestop Weird Statue - 0.05km [17:48:00] Distance: 54.9957639447 [17:48:03] Moving towards pokestop Weird Statue - 0.05km [17:48:03] Distance: 49.9464037463 [17:48:05] Moving towards pokestop Weird Statue - 0.05km [17:48:05] Distance: 45.3039129926
Yes, it's still a little bit annoying. I gess you can try by commenting all the lines of the event_manager.emit method calling. But as I said in a previous message it depends on the type of walker you choose.
i can live with this proper formatted view rather then the buggy type of msg previously :) commenting it out as u suggested .. worked!
[18:01:59] Moving towards pokestop Kinetik I, Tower 1 Lobby, PETR - 0.08km [18:02:01] Moving towards pokestop Kinetik I, Tower 1 Lobby, PETR - 0.08km [18:02:04] Moving towards pokestop Kinetik I, Tower 1 Lobby, PETR - 0.08km
thx Fran for this temporary fix...
This is a big in the coloured logger that isn't respecting debug log level in the messages sent by bot's tasks. Just stop using it and you won't see this problem, because the coloured logger doesn't respect any logging level at all.
@douglascamata how to disable the coloured logger, what are the other options ? Or just dont use the log at al?
@flippamike "logging_color": false
In colored_logging_handler.py you can add:
if event == 'position_update':
return
under
# Replace message if necessary
if event == 'catchable_pokemon':
message = 'Something rustles nearby!'
And it'll stop updating with that message.
Edit: hey it took 10 edits but I finally figured out how to do MD multiline code formatting.