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

No creation location-username.json

Open Critically opened this issue 10 years ago • 21 comments

So, bot not create "location-username.json" in web folder, another files catchable-username.json and inventroy-username.json created successfully.

Critically avatar Jul 25 '16 09:07 Critically

I can confirm this, If you make the file yourself it will update it with the location data correctly :-)

Saturate avatar Jul 25 '16 09:07 Saturate

Can u say, what need to do ?

Critically avatar Jul 25 '16 09:07 Critically

@Reaver01 maybe something for you ?

dmateusp avatar Jul 25 '16 09:07 dmateusp

I don't understand what the issue is. Can you please provide some more info and maybe the console log?
Is the bot itself actually not creating the files? or is it just not reading them?
Also please provide if you are running this through a webserver, or just opening the file.

Reaver01 avatar Jul 25 '16 09:07 Reaver01

I think the problem comes from the fact that it does not create the "location-username.json" file but it DOES update it if it's there in the first place. Is it right @Saturate ?

dmateusp avatar Jul 25 '16 09:07 dmateusp

So, i'm creating this file myself, and it's working, loool. Thanks all.

Critically avatar Jul 25 '16 09:07 Critically

@dmateusp Correct, it does not create the file, but if you manually create it, it updates it just fine. Should be easy to fix :)

Saturate avatar Jul 25 '16 10:07 Saturate

Still should not be closed until the file is created automatically !

dmateusp avatar Jul 25 '16 10:07 dmateusp

think i have the Same here, afte git pull today it doesnt work, following output: Z:\Downloads\PokemonGo-Bot>python pokecli.py [2016-07-25 12:20:52] [x] PokemonGO Bot v1.0 [2016-07-25 12:20:52] [x] Configuration initialized [2016-07-25 12:20:52] [x] The location given using -l could not be parsed. Checking for a cached location. [2016-07-25 12:20:52] [x] Parsing cached location... No cached Location. Please specify initial location.

tpmodding avatar Jul 25 '16 10:07 tpmodding

Its https://github.com/PokemonGoF/PokemonGo-Bot/pokemongo_bot/stepper.py#L110 and https://github.com/PokemonGoF/PokemonGo-Bot/pokemongo_bot/stepper.py#L120. location and last-location is used only if they already exists.

kemko avatar Jul 25 '16 10:07 kemko

Does someone have this problem after add the location-username.json?

VM101 main.js:145 Uncaught TypeError: Cannot read property 'length' of undefined

main.js:145
 for (var i = 0; i < data.cells.length; i++)

zx900930 avatar Jul 25 '16 10:07 zx900930

i created the location-.json by myself, but there are no entrys in it. also catchable-.json, created by the script , ony has {} in it

silelmot avatar Jul 25 '16 10:07 silelmot

Catchable empty too

Critically avatar Jul 25 '16 10:07 Critically

sommeone need to create the code required which creates the files listed below if they are empty or not exists

web\location-%USERNAME%.json

fredrik-hellmangroup avatar Jul 25 '16 11:07 fredrik-hellmangroup

Is anyone working on it atm? If not, I can do this.

Sekhmet avatar Jul 25 '16 11:07 Sekhmet

@Sekhmet please do, and create a pull request once done

fredrik-hellmangroup avatar Jul 25 '16 11:07 fredrik-hellmangroup

https://github.com/PokemonGoF/PokemonGo-Bot/pull/800

anyone want to test this?

DevScarabyte avatar Jul 25 '16 12:07 DevScarabyte

fixed in #800

fredrik-hellmangroup avatar Jul 25 '16 13:07 fredrik-hellmangroup

So, when I create location-username.json myself it's working any time, then in BOT i get error:

Traceback (most recent call last): File "pokecli.py", line 220, in main() File "pokecli.py", line 211, in main bot.take_step() File "c:\pokebot\pokemongo_bot__init__.py", line 36, in take_step self.stepper.take_step() File "c:\pokebot\pokemongo_bot\stepper.py", line 53, in take_step self._walk_to(self.config.walk, *position) File "c:\pokebot\pokemongo_bot\stepper.py", line 88, in _walk_to alt, False) File "c:\pokebot\pokemongo_bot\stepper.py", line 111, in _work_at_position with open(user_web_location, 'w') as outfile: IOError: [Errno 22] invalid mode ('w') or filename: u'web/location-username.com.json'

Critically avatar Jul 25 '16 13:07 Critically

@Critically it has to be location-Critically.json for it to work :) if that is your username.

Saturate avatar Jul 25 '16 13:07 Saturate