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

Web interface - Catchable not updating

Open raxxon opened this issue 10 years ago • 10 comments

Expected Behavior

Catchable file in web directory gets updated for the web interface to display pokemon

Actual Behavior

File is not created and no updates are made when file is manually made

Steps to Reproduce

Install dev branch and get it working

Other Information

OS: Windows 10.1 (Bash shell from Windows 10 Anniversary Update) hazer@BREAKPOINT:~/PokemonGo-Bot$ git log -n 1 --pretty=format:"%H" ; python -V ; uname -a ; bash --version 44a6602ceecf202e5ab0bf05a960b8efcb595551 Python 2.7.6 Linux BREAKPOINT 3.4.0+ #1 PREEMPT Thu Aug 1 17:06:05 CST 2013 x86_64 x86_64 x86_64 GNU/Linux GNU bash, version 4.3.11(1)-release (x86_64-pc-linux-gnu) hazer@BREAKPOINT:~/PokemonGo-Bot$

raxxon avatar Aug 07 '16 07:08 raxxon

There is a user_web_catchable in the root bot directory. You may want to create a symbolic link and have it be in the web directory as catchable-Username.json

ColdSunERA avatar Aug 07 '16 07:08 ColdSunERA

That is indeed a fix. Linked it over and it's updating the web interface with spawning pokemon...

Guess there's something that will need to be tinkered in a later push once more serious things are addressed.

raxxon avatar Aug 07 '16 07:08 raxxon

Glad to have it resolved :)

ColdSunERA avatar Aug 07 '16 07:08 ColdSunERA

I wouldn't call this resolved at all.

In catch_visible_pokemon.py:

under def work(self):

user_web_catchable = 'web/catchable-%s.json' % (self.bot.config.username)

then change

with open('user_web_catchable', 'w') as outfile:

to

with open(user_web_catchable, 'w') as outfile:

MikeDX avatar Aug 07 '16 07:08 MikeDX

The current issue is resolved to a functional state. The issue is still open so that the Devs can make a permanent fix. Eventually the proper resolution will be merged into the code base and everything will be fine, however I think they have bigger fish to deal with and no, I don't mean the 200CP Magikarp.

raxxon avatar Aug 07 '16 07:08 raxxon

@raxxon what i just posted is the correct fix. However I will leave it up to someone else to make a pull request based on those changes.

Symlinking the current "user_web_catchable" file does not work if you are running multiple instances of the bot with a single web interface.

MikeDX avatar Aug 07 '16 07:08 MikeDX

Good point, but last I saw there were issues running multiple bots from the same directory tree... have those issues been dealt with since the new API release?

raxxon avatar Aug 07 '16 07:08 raxxon

@raxxon I have no idea, I was running multiple bots here for a while but not tried since the unknown6 carnival... The web interface never really worked properly for multiple bots anyway, it sort of worked, but not really. Only the first bot showed an avatar / path but it was useful for the stats for the other bots.

MikeDX avatar Aug 07 '16 07:08 MikeDX

I saw several reports for the dev branch of the bot not working past the first iteration. I assume that if you setup multiple independent directories you could still run multiple, but yeah, then the unknown6 fiesta started....

Why run multiple bots?

raxxon avatar Aug 07 '16 07:08 raxxon

I have friends who aren't technical enough to run the bots themselves so I have been helping them out. However that just became a nuisance because the config files change so often. Seriously considering making my own bot, with blackjack and hookers...

MikeDX avatar Aug 07 '16 07:08 MikeDX