gdata internal error
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('user@googlemail.com', '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?
Since you're not passing anything in GetContentFeed
, it's using CONTENT_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.
精彩评论