carolinux / gdata-python-client

Automatically exported from code.google.com/p/gdata-python-client
0 stars 1 forks source link

Internal server error with GetContentFeed() #537

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Run the following code every 5 minutes as a schedulded tasks:gives inconsistent 
results:
Code:
import gdata.sites.client
import gdata.sites.data
client = gdata.sites.client.SitesClient(source='testapp', site='xx')
client.ssl = True  # Force API requests through HTTPS
client.ClientLogin('xxxx@googlemail.com', 'yyyy', client.source);
feed = client.GetContentFeed()
#delete old entries
for entry in feed.entry:
    print entry.title.text
    client.Delete(entry)
entry = client.CreatePage('webpage', 'page1', html=htmlData)
#print "Entry is"+entry
entry2 = client.CreatePage('webpage', 'page2', html=htmlData2)

What is the expected output? What do you see instead?
It works about 1 out of 6 times. otherwise I see the following traceback:
"Traceback (most recent call last):
  File "C:\prod\googleSite\googleSite2.py", line 23, in <module>
    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"

What version of the product are you using?
gdata-2.0.14-py2.7

Please provide any additional information below.
Please check if it is related to my account or am I missing any kind of flush 
or should I update the content instead of add/delete?

Original issue reported on code.google.com by system.a...@googlemail.com on 16 Aug 2011 at 5:35

GoogleCodeExporter commented 9 years ago
System is Windows 7, Python 2.7.

Original comment by system.a...@googlemail.com on 16 Aug 2011 at 6:17

GoogleCodeExporter commented 9 years ago
Can you send me a private message with details about which account saw this 500 
error?  Are you still able to reproduce?  I just want to make sure that this 
was not a temporary issue.

Thanks!

Original comment by vicfry...@google.com on 19 Aug 2011 at 4:29

GoogleCodeExporter commented 9 years ago
I have sent you the details a while ago - the issue is still there. I tried it 
with continous tries and it worked after 10-20 tries, but even this has stopped 
now - so I am currently serializing the objects after creation for deletion of 
the pages.

Original comment by system.a...@googlemail.com on 2 Sep 2011 at 11:27

GoogleCodeExporter commented 9 years ago
I have the same problem . 

def GetInboxMessage(self):
  uri = 'https://gdata.youtube.com/feeds/api/users/default/inbox?v=2&key=%s' %DEVELOPER_KEY
  print 'GET INBOX\n'
  feed = yt_service.GetYouTubeVideoFeed(uri)

  for entry in feed.entry:  
    try:    
        PrintVideoDetails(self,entry,'videomessage')
    except:
        pass

Works for my account , doesn't work for a friend's account . What should I do ? 
It throws this error : 

File "/usr/local/lib/python2.7/dist-packages/gdata/youtube/service.py", line 
183, in GetYouTubeVideoFeed
return self.Get(uri, converter=gdata.youtube.YouTubeVideoFeedFromString) File 
"/usr/local/lib/python2.7/dist-packages/gdata/service.py", line 1108, in Get 
'reason': server_response.reason, 'body': result_body}

gdata.service.RequestError: {'status': 500, 'body': 
"http://schemas.google.com/g/2005'>GDataServiceExceptionInternal Error", 
'reason': 'Internal Server Error'}

Original comment by mariosar...@gmail.com on 7 Feb 2013 at 4:20