Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MoveToMapPokemon JSON format is not valid error #5313

Closed
crvfts opened this issue Sep 9, 2016 · 13 comments
Closed

MoveToMapPokemon JSON format is not valid error #5313

crvfts opened this issue Sep 9, 2016 · 13 comments

Comments

@crvfts
Copy link
Contributor

crvfts commented Sep 9, 2016

Expected Behavior

To be notified only if there's an error

Actual Behavior

Receiving JSON error but JSON is valid

Your FULL config.json (remove your username, password, gmapkey and any other private info)

{
"type": "MoveToMapPokemon",
"config": {
"enabled": true,
"address": "http://localhost:5010",
"max_sniping_distance": 333,
"max_walking_distance": 333,
"min_time": 240,
"min_ball": 5,
"prioritize_vips": true,
"snipe": false,
"snipe_high_prio_only": true,
"snipe_high_prio_threshold": 799,
"mode": "priority",
"map_path": "raw_data",
"walker": "StepWalker",
"max_extra_dist_fort": 5,
"update_map": false,
"snipe_max_in_chain": 21,
"debug": false,
"catch": {
"Bulbasaur": 801,
"Mew": 2600
}
}
},

Output when issue occurred

[2016-09-08 21:44:28] [MainThread] [MoveToMapPokemon] [INFO] Failure! JSON format is not valid
[2016-09-08 21:44:29] [MainThread] [MoveToFort] [INFO] Moving towards pokestop Statue of Minerva - 48.24m
[2016-09-08 21:44:35] [MainThread] [MoveToMapPokemon] [INFO] Failure! JSON format is not valid
[2016-09-08 21:44:35] [MainThread] [MoveToFort] [INFO] Moving towards pokestop Statue of Minerva - 46.17m

Steps to Reproduce

Other Information

OS: Windows

Branch: dev

Git Commit: 732463c

Python Version: 2.7.12 64-bit

Any other relevant files/configs (eg: path files)

Only happening with MoveToMapPokemon task. JSONlint says JSON is valid.

Reverted to commit fcccb0f and the error goes away and it finds pokemon on the list and working as it did previously.

@crvfts
Copy link
Contributor Author

crvfts commented Sep 9, 2016

ran with debug on and got this-

[2016-09-08 22:42:45] Failure! JSON format is not valid
[2016-09-08 22:42:45] No pokemons in list to snipe
[2016-09-08 22:42:47] Failure! JSON format is not valid
[2016-09-08 22:42:47] No pokemons in list to snipe
[2016-09-08 22:42:50] Failure! JSON format is not valid
[2016-09-08 22:42:50] No pokemons in list to snipe

pogom is running fine, not sure what's going on here.

@mjmadsen
Copy link
Contributor

mjmadsen commented Sep 9, 2016

Looks like there is an error of output from http://localhost:5010

@mitcht
Copy link

mitcht commented Sep 9, 2016

agreed

@farshidhss
Copy link

Same problem here! I think it has something to do with the new commit in Pokemon map and the format of JSON reply from their api. I might be wrong though. Could someone please check it. As it is now if you update both bot and the map then it would throw JSON format not valid!

@crvfts
Copy link
Contributor Author

crvfts commented Sep 9, 2016

@mjmadsen after noting your comment i tried port 5000, same error. If I observe catchable-etc.json open in SublimeText I can see pokemon values changing in real-time and they are printed as valid JSON. The pokemon/lat/long are coordinates my scanners are scanning. If I simply copy catchable-etc.json to the folder I have commit fcccb0f installed and immediately run the bot it works as intended and goes after the exact pokemon recently written to catchable-. The next thing I tried was enabling social, upon doing so the error went away. To me it appears the error is somehow tied to map-chat. Again, commit fcccb0f does not give me this issue. If it works for fcccb0f, then how could there be an output error? I'm thinking that the debug message "No pokemons in list to snipe" is that the bot is looking for spawns coming from map-chat (possibly in another file?). So what is happening with current dev, for me, is that pogom is printing pokemon id's and spawn points to catchable-.json just fine but that the bot is not reading from catchable- correctly OR is reading from elsewhere. But with commit fcccb0f the bot is reading from catchable- as one would expect it to.

@sohje
Copy link
Contributor

sohje commented Sep 9, 2016

try to change:

"address": "http://localhost:5000" to "address": "http://localhost:5000/raw_data",

@crvfts
Copy link
Contributor Author

crvfts commented Sep 9, 2016

@sohje 's solution works!

Should I start using /raw_data from now on if I want to only pursue pokes from my scanners?

@sohje
Copy link
Contributor

sohje commented Sep 9, 2016

Yeap

@sohje
Copy link
Contributor

sohje commented Sep 9, 2016

New code doesnt concat address + map_path => localhost:5000/raw_data.
You should add url to the address option.

@crvfts
Copy link
Contributor Author

crvfts commented Sep 9, 2016

ok cool, thanks again.

@crvfts crvfts closed this as completed Sep 9, 2016
@farshidhss
Copy link

Then a dev needs to update the config.json.map.example to match this change.

@Tych0n
Copy link

Tych0n commented Sep 10, 2016

@sohje i had the same issue and for addition to #5313 (comment) i had to set "map_path" to blank "".

P.S. Further investigation showed, that "map_path" option isn't essential if you set "enable_social" to false and turn off sniping. Check here #5094

@YvesHenri
Copy link

Just to clarify some things, "map_path" is deprecated at all but wasnt removed from the docs yet. Sorry about that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants