Python urllib2.URLError:<;urlopen错误[Errno 32]管道断裂-Google Leads

Python urllib2.URLError:<;urlopen错误[Errno 32]管道断裂-Google Leads,python,google-api,urllib2,google-ads-api,Python,Google Api,Urllib2,Google Ads Api,我正试图通过Adwords API将一个文件上传到谷歌,我正在使用谷歌提供的脚本: 几分钟后,我发现以下错误。我在一个较小的文件上尝试了这个方法,效果很好。不知道它为什么会在这里断裂。有什么想法吗 File "./g_leads.sh", line 71, in <module> main(adwords_client, EMAILS) File "./g_leads.sh", line 43, in main response = user_list_ser

我正试图通过Adwords API将一个文件上传到谷歌,我正在使用谷歌提供的脚本:

几分钟后,我发现以下错误。我在一个较小的文件上尝试了这个方法,效果很好。不知道它为什么会在这里断裂。有什么想法吗

  File "./g_leads.sh", line 71, in <module>
    main(adwords_client, EMAILS)
  File "./g_leads.sh", line 43, in main
    response = user_list_service.mutateMembers([mutate_members_operation])
  File "/opt/stateadm/.local/lib/python2.7/site-packages/googleads/common.py", line 296, in MakeSoapRequest
    for arg in args])
  File "/opt/stateadm/.local/lib/python2.7/site-packages/suds/client.py", line 521, in __call__
    return client.invoke(args, kwargs)
  File "/opt/stateadm/.local/lib/python2.7/site-packages/suds/client.py", line 581, in invoke
    result = self.send(soapenv)
  File "/opt/stateadm/.local/lib/python2.7/site-packages/suds/client.py", line 613, in send
    reply = self.options.transport.send(request)
  File "/opt/stateadm/.local/lib/python2.7/site-packages/suds/transport/https.py", line 66, in send
    return HttpTransport.send(self, request)
  File "/opt/stateadm/.local/lib/python2.7/site-packages/suds/transport/http.py", line 82, in send
    fp = self.u2open(u2request)
  File "/opt/stateadm/.local/lib/python2.7/site-packages/suds/transport/http.py", line 132, in u2open
    return url.open(u2request, timeout=tm)
  File "/opt/python/lib/python2.7/urllib2.py", line 400, in open
    response = self._open(req, data)
  File "/opt/python/lib/python2.7/urllib2.py", line 418, in _open
    '_open', req)
  File "/opt/python/lib/python2.7/urllib2.py", line 378, in _call_chain
    result = func(*args)
  File "/opt/python/lib/python2.7/urllib2.py", line 1215, in https_open
    return self.do_open(httplib.HTTPSConnection, req)
  File "/opt/python/lib/python2.7/urllib2.py", line 1177, in do_open
    raise URLError(err)
urllib2.URLError: <urlopen error [Errno 32] Broken pipe>
文件“/g_leads.sh”,第71行,在
主(adwords_客户端、电子邮件)
文件“/g_leads.sh”,第43行,主
响应=用户\u列表\u服务。mutateMembers([mutate\u members\u operation])
MakeSoapRequest中的文件“/opt/stateadm/.local/lib/python2.7/site packages/gogleads/common.py”,第296行
对于args中的arg])
文件“/opt/stateadm/.local/lib/python2.7/site packages/suds/client.py”,第521行,在调用中__
返回client.invoke(args、kwargs)
文件“/opt/stateadm/.local/lib/python2.7/site packages/suds/client.py”,调用中第581行
结果=self.send(soapenv)
文件“/opt/stateadm/.local/lib/python2.7/site packages/suds/client.py”,第613行,在send中
reply=self.options.transport.send(请求)
文件“/opt/stateadm/.local/lib/python2.7/site packages/suds/transport/https.py”,第66行,在send中
返回HttpTransport.send(self,request)
文件“/opt/stateadm/.local/lib/python2.7/site packages/suds/transport/http.py”,第82行,在send中
fp=self.u2open(u2request)
文件“/opt/stateadm/.local/lib/python2.7/site packages/suds/transport/http.py”,第132行,打开
返回url.open(u2request,timeout=tm)
文件“/opt/python/lib/python2.7/urllib2.py”,第400行,打开
响应=自身打开(请求,数据)
文件“/opt/python/lib/python2.7/urllib2.py”,第418行,打开
"开放",
文件“/opt/python/lib/python2.7/urllib2.py”,第378行,在调用链中
结果=func(*args)
文件“/opt/python/lib/python2.7/urllib2.py”,第1215行,https_open
返回self.do_open(httplib.HTTPSConnection,req)
文件“/opt/python/lib/python2.7/urllib2.py”,第1177行,打开
引发URL错误(err)
urllib2.URLError:

错误32断开的管道表示远程服务器关闭了套接字。我猜传输时间太长了,因为API文档显示,如果文件本身太大,它们将返回错误

相反,这可能是谷歌per的间歇性问题