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

Want to create a log when i catched pokemon

Open rednka opened this issue 10 years ago • 14 comments

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 from pokemongo_bot import logger File "D:\Documents and Settings\flo\Bureau\PokemonGo-B from cell_workers import PokemonCatchWorker, SeenFor File "D:\Documents and Settings\flo\Bureau\PokemonGo-B from pokemon_catch_worker import PokemonCatchWorker File "D:\Documents and Settings\flo\Bureau\PokemonGo-B fichier.write("\nNom: ".pokemon_name." %: ".cp."") ^

i don't understand why it's bugged, can you help me ?

thanks for the job ! have a nice day

rednka avatar Jul 27 '16 21:07 rednka

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

DavidTai1 avatar Jul 27 '16 23:07 DavidTai1

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

rednka avatar Jul 27 '16 23:07 rednka

pokemon_catch_worker.py line 87 right under the log. It works for me

DavidTai1 avatar Jul 28 '16 00:07 DavidTai1

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 ..

rednka avatar Jul 28 '16 00:07 rednka

image image I made some change to it.

DavidTai1 avatar Jul 28 '16 01:07 DavidTai1

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

rednka avatar Jul 28 '16 01:07 rednka

3a18aa57dfb67e2e09c207087cad6e5aa1867112 This is the version i use

DavidTai1 avatar Jul 28 '16 01:07 DavidTai1

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: bug

Error to image: bug

rednka avatar Jul 28 '16 08:07 rednka

what is your python version?

DavidTai1 avatar Jul 28 '16 16:07 DavidTai1

2.7.X

rednka avatar Jul 28 '16 17:07 rednka

Same here, no idea why you have that error. Maybe try put tab before image just like the form I did.

DavidTai1 avatar Jul 28 '16 20:07 DavidTai1

no work again .. i don't understand why doesn't work, i have just use for test: cap_pok.write('test'); and same error..

rednka avatar Jul 28 '16 22:07 rednka

no idea.. maybe google for another way

DavidTai1 avatar Jul 29 '16 00:07 DavidTai1

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

AdaptCharm avatar Jul 29 '16 19:07 AdaptCharm