0

从昨天开始,我更改了使用的 IP 地址后,一个正常工作的 Python gdata 程序已经停止工作。我收到以下堆栈跟踪:

回溯(最后一次调用):文件“C:\prod\googleSite\googleSite2.py”,第 23 行,在 feed = client.GetContentFeed() 文件“C:\Python27\lib\site-packages\gdata\sites\ client.py”,第 155 行,在 get_c ontent_feed auth_token=auth_token, **kwargs) 文件“C:\Python27\lib\site-packages\gdata\client.py”,第 635 行,在 get_feed **kwargs) 文件中“ C:\Python27\lib\site-packages\gdata\client.py",第 320 行,在请求 RequestError) gdata.client.RequestError:服务器响应:500,内部错误

代码如下:

    import gdata.sites.client
import gdata.sites.data
client = gdata.sites.client.SitesClient(source='xxx', site='yyy')
client.ssl = True  # Force API requests through HTTPS
client.ClientLogin('user@googlemail.com', 'password', client.source);
feed = client.GetContentFeed();

更新:问题在一小时后自行解决 - 是否有任何形式的提交或注销来避免这种情况?

4

1 回答 1

1

由于您没有传递任何内容GetContentFeed,因此它CONTENT_FEED_TEMPLATE % (self.domain, self.site)用作 URI。我不确定 IP 更改是否会影响 self.domain/self.site 值应该是什么,但可能值得一试。

于 2011-08-12T12:44:34.260 回答