[英]Using gspread with proxy
I am trying to access google spreadsheets through gspread api
in python.我正在尝试通过 python 中的
gspread api
访问谷歌电子表格。 I have imported gspread
.我已经导入了
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', '********')
error: [Errno 10061] No connection could be made because the target machine actively refused it
在gc = gspread.login('pan*******@gmail.com', '********')
处error: [Errno 10061] No connection could be made because the target machine actively refused it
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?我添加了两个环境变量作为
'http_proxy':'host:port'
和'https_proxy':'host:port'
我做错了什么? Thank you.谢谢你。
For anyone who might have this problem, I found out that gspread library doesn't support proxy connections.对于可能遇到此问题的任何人,我发现 gspread 库不支持代理连接。 I ran it through normal connection and it worked.
我通过正常连接运行它并且它起作用了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.