gdata内部错误
从昨天起,在我更改使用的 IP 地址后,一个正在运行的 Python gdata 程序停止运行。 我收到以下堆栈跟踪:
回溯(最近一次调用最后一次): 文件“C:\prod\googleSite\googleSite2.py”,第 23 行,位于 feed = client.GetContentFeed() 文件“C:\Python27\lib\site-packages\gdata\sites\client.py”,第 155 行,在 get_c 中 内容提要 auth_token = auth_token,** kwargs) 文件“C:\Python27\lib\site-packages\gdata\client.py”,第 635 行,在 get_feed 中 **夸格斯) 文件“C:\Python27\lib\site-packages\gdata\client.py”,第 320 行,根据请求 请求错误) 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('[email protected]', 'password', client.source);
feed = client.GetContentFeed();
更新: 一小时后问题自行修复 - 是否有任何类型的提交或注销可以避免这种情况?
Since yesterday a working Python gdata program has stopped working after I changed the IP address used.
I receive the following stack trace:
Traceback (most recent call last):
File "C:\prod\googleSite\googleSite2.py", line 23, in
feed = client.GetContentFeed()
File "C:\Python27\lib\site-packages\gdata\sites\client.py", line 155, in get_c
ontent_feed
auth_token=auth_token, **kwargs)
File "C:\Python27\lib\site-packages\gdata\client.py", line 635, in get_feed
**kwargs)
File "C:\Python27\lib\site-packages\gdata\client.py", line 320, in request
RequestError)
gdata.client.RequestError: Server responded with: 500, Internal Error
The code is as follow:
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('[email protected]', 'password', client.source);
feed = client.GetContentFeed();
Update:
The issue fixes itself after an hour - is there any kind of commit or logout to avoid this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于您没有在
GetContentFeed
中传递任何内容,因此它使用CONTENT_FEED_TEMPLATE % (self.domain, self.site)
作为 URI。我不确定 IP 更改是否会对 self.domain/self.site 值产生影响,但可能值得检查一下。Since you're not passing anything in
GetContentFeed
, it's usingCONTENT_FEED_TEMPLATE % (self.domain, self.site)
as the URI. I'm not sure if the IP change had an impact on what the self.domain/self.site values should be, but it might be worth checking those out.