Want to create a log when i catched pokemon
Hello, sorry for my bad language, i'm not english, i want to create a log.txt file when i catched a pokemon (write pokemon name and iv value in the text file)
i'm a newbie to python, but i have search the script for catched pokemon, it's pokemongo_bot/cell_workers/pokemon_catch_worker.py right ?
After the line 136 i have added :
fichier = open("log.txt", "a") fichier.write("\nNom: ".pokemon_name." %: ".pokemon_potential."") fichier.close()
And i have this error :
SyntaxError: invalid syntax
Traceback (most recent call last):
File "pokecli.py", line 39, in
i don't understand why it's bugged, can you help me ?
thanks for the job ! have a nice day
with open('cap_pok.txt','a') as cap_pok: cap_pok.write('A Wild {} appeared! [CP {}] [Potential {}]\n'.format( pokemon_name, cp, pokemon_potential));
This is what I use
Hello, were are you put this code ?
Me, after the line 136 (cell_workers/pokemon_catch_workers.py=
open('cap_pok.txt','a') as cap_pok: cap_pok.write('{} a etait capture ! [CP {}] [Potential {}]\n'.format( pokemon_name, cp, pokemon_potential));
edit : i have the same error with your code
pokemon_catch_worker.py line 87 right under the log. It works for me
Sorry but isn't work for me ..
i need to put your code before this comment ?
# @TODO, use the best ball in stock to catch VIP (Very Important Pokemon: Configurable)
i have all time the same error ..
I made some change to it.
Thanks, but why i don't have the same script ?
I'm really a newbie to github/python ... master version can't be modified ?
i have python 2.7, PokemonGo-Bot 1.0, Windows XP, git ...
And this is my pokemon_catch_worker.py (whitout your script because crashing the bot)
EDIT : Can't upload the script her, don't know why i have create a .zip archive with the script but git don't want to receive it, so sorry for the large comment
for test, i have paste your script after the variable id_list2 and no work again
EDIT2: script retired, comment is to long
3a18aa57dfb67e2e09c207087cad6e5aa1867112 This is the version i use
Hello again .. i have "update" to your version, i haven't touch to anything and it's doesn't work !
it's crazy..
Script to image:

Error to image:

what is your python version?
2.7.X
Same here, no idea why you have that error. Maybe try put tab before
just like the form I did.
no work again .. i don't understand why doesn't work, i have just use for test:
cap_pok.write('test'); and same error..
no idea.. maybe google for another way
Please upgrade to the latest dev branch by running this command:
git reset --hard
git pull -f
Then run this command:
pip install --upgrade -r requirements.txt
If issue persists, open a new issue.
/closed