Bot crashes after a few hours of uptime
Expected Behavior
The bot shouldn't crash at all. It should be stable and run 24/7 without crashes.
Actual Behavior
The bot crashes after a few hours uptime. It's crashing at different times. Sometimes 30 mins, 2 hours, etc etc.
http://m.imgur.com/rZ0Z2D5
Steps to Reproduce
Use the latest version and run the bot.
Other Information
OS: Ubuntu 14.04 Git Commit: (run 'git log -n 1 --pretty=format:"%H"' and paste it here) 3aca6d798f8a3e173dce0beb7b13c9505cc5b251
+1 I have same exception:
Traceback (most recent call last):
File "./pokecli.py", line 220, in <module>
main()
File "./pokecli.py", line 211, in main
bot.take_step()
File "/home/server/PokemonGo-Bot/pokemongo_bot/__init__.py", line 36, in take_step
self.stepper.take_step()
File "/home/server/PokemonGo-Bot/pokemongo_bot/stepper.py", line 62, in take_step
self._work_at_position(position[0], position[1], position[2], True)
File "/home/server/PokemonGo-Bot/pokemongo_bot/stepper.py", line 139, in _work_at_position
self.bot.work_on_cell(cell, position, pokemon_only)
File "/home/server/PokemonGo-Bot/pokemongo_bot/__init__.py", line 93, in work_on_cell
worker.work()
File "/home/server/PokemonGo-Bot/pokemongo_bot/cell_workers/move_to_fort_worker.py", line 30, in work
self.stepper._walk_to(self.config.walk, *position)
File "/home/server/PokemonGo-Bot/pokemongo_bot/stepper.py", line 88, in _walk_to
alt, False)
File "/home/server/PokemonGo-Bot/pokemongo_bot/stepper.py", line 102, in _work_at_position
response_dict = self.api.call()
File "/home/server/PokemonGo-Bot/src/pgoapi/pgoapi/pgoapi.py", line 81, in call
response = request.request(api_endpoint, self._req_method_list, player_position)
File "/home/server/PokemonGo-Bot/src/pgoapi/pgoapi/rpc_api.py", line 98, in request
raise NotLoggedInException()
pgoapi.exceptions.NotLoggedInException
+1 Same here as well
[2016-07-26 21:02:40] [x] Using Pokeball (chance: 47.34%)... (55 left!)
[2016-07-26 21:02:42] [x] Captured Pidgey! [CP 155] [IV 0.29]
[2016-07-26 21:02:44] [#] Pidgey has been exchanged for candy!
Traceback (most recent call last):
File "pokecli.py", line 220, in
Temp fix: Just make bash script (if linux or mac):
#!/bin/bash
while true
do
./pokecli.py
echo ">pokecli exited... restarting...";
sleep 5;
done
And fixed :D
Excuse me, what bash script?
Just input that in terminal every time before running, right?
Create file "start.sh" put this:
#!/bin/bash
while true
do
./pokecli.py
echo ">pokecli exited... restarting...";
sleep 5;
done
and in terminal:
chmod u+x start.sh
./start.sh
Should I type ''' chmod u+x start.sh ./start.sh ''' Every time before I run it?
Same issue. What to do ?
same here :") what should i do in win10 ?
So... Because pokecli.py have exception and he dropped. I recommend use "auto restart" script, for now.
So, for linux or mac you need create file in folder, where you have pokecli.py, for example start.sh with this data:
#!/bin/bash
while true
do
./pokecli.py
echo ">pokecli exited... restarting...";
sleep 5;
done
Okay, now need give permission for this file from terminal / console:
chmod u+x start.sh
And next time, you need start only
./start.sh
For windows, you need create file in folder where "pokecli.py" with name, for example start.bat with this data:
@echo off
:begin
python2 pokecli.py
goto begin
and start, your file "start.bat".
duplicate of #906
@MeGaPk I get this error on LInux -bash: ./start.sh: /bin/bash^M: bad interpreter: No such file or directory
@leovarmak You have unknown symbols in first line your file. Try delete and write manually this line, or: install dos2unix program and dos2unix start.sh
@MeGaPk will try and let you know
@MeGaPk The bot runs just fine when started with python pokecli.py or ./pokecli.py but only when using the shell script to run the application do I get an import error saying there's no module named google maps. Any idea why this would be happening?
@castiliad strange... can you show here your script?
@MeGaPk
#!/bin/bash
while true
do
python pokecli.py
echo ">Bot crashed. Restarting...";
sleep 5;
done
I've tried using ./pokecli.py instead of python pokecli.py as well
@castiliad strange, no have idea... Maybe you write to my skype: ivan6335523, i can help from team viewer or etc?
@MeGaPk I had multiple terminal windows opened and I just tested the script in a different terminal session and it worked just fine now. I'm not sure what happened or why it would do that. Thanks for your help though.
Pokecli.py seems to crash every hour or so, I use Windows 10 I will be greatful if anyone can help me.
@dorbenshimol read my comments in this topic. I have for windows solution too.