0

I am writing an application in Python that should be able to create and modify events in a Google Calendar according to the data in a Google Sheet.

As I have almost no experience with these APIs, I am following this simple guide on the Google documentation https://developers.google.com/google-apps/calendar/quickstart/python#. I enabled the Calendar API in the Developer Console of my project and installed the Google libraries as explained in Step 1 and Step 2. When I try to run the quickstart - which I simply copied from the guide - the script correctly opens up a window in my browser (Google Chrome) asking to give permission to my application to access the calendars. When I click on "Accept", however, I get an error page saying that "localhost didn’t send any data. ERR_EMPTY_RESPONSE". No credentials are stored in the ~/.credentials folder, as it should happen according to the script. Moreover, the execution of the script hangs at the point of authentication. Where could the problem be?

0

1 Answer 1

1

After following the Python Quickstart setup guide,

make sure you're running a local webserver like

python -m SimpleHTTPServer 8080 

After that my python script ran without a hitch:

console output:

noogui@noogui-dpg:~/Downloads/calendarquickstart$ python calendarquickstart.py
Getting the upcoming 10 events
2018-12-23T11:30:00+08:00 Foo Fighters Concert
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.