Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/306.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/sockets/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python gspread登录错误10060_Python_Sockets_Gmail_Gspread - Fatal编程技术网

Python gspread登录错误10060

Python gspread登录错误10060,python,sockets,gmail,gspread,Python,Sockets,Gmail,Gspread,我正在尝试使用gspread登录我的谷歌帐户。但是,它只是在套接字错误号为10060时超时。我已经在我的电子邮件上激活了POP和IMAP访问 import gspread print 1 gc = gspread.Client(auth=('***@gmail.com', '*****')) print 2 gc.login() print 2 sht = gc.open_by_url('https://docs.google.com/spreadsheets/d/1XEThXRqWc_Vs4j

我正在尝试使用gspread登录我的谷歌帐户。但是,它只是在套接字错误号为10060时超时。我已经在我的电子邮件上激活了POP和IMAP访问

import gspread
print 1
gc = gspread.Client(auth=('***@gmail.com', '*****'))
print 2
gc.login()
print 2
sht = gc.open_by_url('https://docs.google.com/spreadsheets/d/1XEThXRqWc_Vs4j_6oIuSPXoybj7aUp4h3g1bqPnBzRM/edit#gid=0')
print 3
val = sht.acell('B1').value
我的错误


谢谢大家

套接字错误号10060表示主机根本没有响应您。您能用浏览器访问电子表格吗?这可能是网络设置问题,您可能被阻止我在网上看到了一些关于此问题的报告,如果您提出了很多请求,他们可能会阻止您,等等。很难说,因为您的代码没有问题。

是的,我的浏览器可以访问该工作表。您可以在IE中访问它吗?如果存在IE代理设置,urllib将使用IE代理设置。我可以在IEL上访问它。gspread工作不需要POP或IMAP访问。我在这里看到的是,您没有连接到Google电子表格API服务器。你有代理服务器吗?