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

Current master is crashing for me at stop

Open davericher opened this issue 10 years ago • 2 comments

Expected Behavior

Go to stop, get stuff

Actual Behavior

Crash: [2016-07-27 15:49:02] [#] Arrived at Pokestop Traceback (most recent call last): File "pokecli.py", line 240, in main() File "pokecli.py", line 233, in main bot.take_step() File "/home/irony/code/OpenPoGoBot/pokemongo_bot/init.py", line 65, in take_step self.stepper.take_step() File "/home/irony/code/OpenPoGoBot/pokemongo_bot/stepper.py", line 39, in take_step self._work_at_position(position[0], position[1], True) File "/home/irony/code/OpenPoGoBot/pokemongo_bot/stepper.py", line 107, in _work_at_position self.bot.work_on_cell(cell, pokemon_only) File "/home/irony/code/OpenPoGoBot/pokemongo_bot/init.py", line 104, in work_on_cell walk_worker.work() File "/home/irony/code/OpenPoGoBot/pokemongo_bot/cell_workers/walk_towards_fort_worker.py", line 49, in work logger.log(u"[#] Now at Pokestop: " + fort_name) File "/home/irony/code/OpenPoGoBot/pokemongo_bot/logger.py", line 29, in log print(output) UnicodeEncodeError: 'ascii' codec can't encode character u'\xc9' in position 43: ordinal not in range(128)

Steps to Reproduce

Run bot, walk to stop

Other Information

OS: linux Git Commit: 61ebbba2d722da4de70b713605b5aabc02e798f3

davericher avatar Jul 27 '16 19:07 davericher

http://www.charbase.com/00c9-unicode-latin-capital-letter-e-with-acute seems its a charset issue with the actual stop name

davericher avatar Jul 27 '16 20:07 davericher

Solve this with a Script in my case im using apple script maybe u can use iterm2 for this? code looks like that in my case: delay in sec for your needs. its more like a workaround

repeat

    delay 1200

    tell application "Terminal"
        activate

        tell application "System Events"
            keystroke "c" using {control down}
        end tell
        delay 3
        do script "clear" in selected tab of the front window
        delay 3
        do script "python pokecli.py" in selected tab of the front window
        delay 10
        tell application "System Events"
            keystroke "ö" using {command down}
        end tell

    end tell
end repeat

Philipp59 avatar Jul 27 '16 20:07 Philipp59