-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Comments
ran with debug on and got this- [2016-09-08 22:42:45] Failure! JSON format is not valid pogom is running fine, not sure what's going on here. |
Looks like there is an error of output from http://localhost:5010 |
agreed |
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! |
@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. |
try to change: "address": "http://localhost:5000" to "address": "http://localhost:5000/raw_data", |
@sohje 's solution works! Should I start using /raw_data from now on if I want to only pursue pokes from my scanners? |
Yeap |
New code doesnt concat address + map_path => localhost:5000/raw_data. |
ok cool, thanks again. |
Then a dev needs to update the config.json.map.example to match this change. |
@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 |
Just to clarify some things, "map_path" is deprecated at all but wasnt removed from the docs yet. Sorry about that. |
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.
The text was updated successfully, but these errors were encountered: