I am trying to access google spreadsheets through gspread api
in python. I have imported gspread
. I am getting socket. error: [Errno 10061] No connection could be made because the target machine actively refused it
at gc = gspread.login('pan*******@gmail.com', '********')
Here is my code:
import urllib2
import urllib
import gspread
from PIL import Image
from PIL import ImageDraw
from PIL import ImageFont
w = 420
gc = gspread.login('pan******@gmail.com', '*******')
wks = gc.open("Spreadsheet").sheet1
I have checked that the username and password is correct. I have added two environment variables as 'http_proxy':'host:port'
and 'https_proxy':'host:port'
What am I doing wrong?
Thank you.
gspread
module didn't work for me and I got the same error as mentioned in the problem statement. I found one workaround i.e. usescript editor
in spreadsheet to write functions do things and you can call these function by send just http post request to the sheet. – Adinaadine