[python] Displaying better error message than "No JSON object could be decoded"