I have a Django (1.9.1) project that was working just fine until I added the code provided by Google Calendar API documentation to one of my apps.
This code also works f
This error is caused because Django is not able to complete the authentication process required by the API.
For me, the error was in token.json
file. Clearing it and write a script to call the API again corrected the flow procedure and hence the server resumed.
Replace:
flags = argparse.ArgumentParser(parents=[tools.argparser]).parse_args()
with
flags = tools.argparser.parse_args([])