carolinux / gdata-python-client

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

gdata.analytics broken due to deprication of 2.3 api #635

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
google api discontinues the 2.3 analytics API last week. as a result the gdata 
analytics api no longer works.

fix:
 support googla api v2.4 or (better)  api v3.0

What steps will reproduce the problem?
1. analyticsService = gdata.analytics.service.AccountsService()
2.analyticsService.SetAuthSubToken(account.token)
3.accountlist = analyticsService.GetAccountList()

What is the expected output? What do you see instead?
you get an exception (100% reproducible)

 File "epstats/graphs.py", line 165, in find_account_list
   accountlist = analyticsService.GetAccountList()

 File "virtualenv/lib/python2.6/site-packages/gdata/analytics/service.py", line 97, in GetAccountList
   return self.QueryAccountListFeed(q.ToUri())

 File "virtualenv/lib/python2.6/site-packages/gdata/analytics/service.py", line 77, in QueryAccountListFeed
   return self.Get(uri, converter=gdata.analytics.AccountListFeedFromString)

 File "virtualenv/lib/python2.6/site-packages/gdata/service.py", line 1108, in Get
   'reason': server_response.reason, 'body': result_body}

RequestError: {'status': 404, 'body': '<!DOCTYPE html>\n<html lang=en>\n  <meta 
charset=utf-8>\n  <meta name=viewport content="initial-scale=1, 
minimum-scale=1, width=device-width">\n  <title>Error 404 (Not 
Found)!!1</title>\n  <style>\n    *{margin:0;padding:0}html,code{font:15px/22px 
arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% 
auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > 
body{background:url(//www.google.com/images/errors/robot.png) 100% 5px 
no-repeat;padding-right:205px}p{margin:11px 0 
22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media 
screen and 
(max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right
:0}}\n  </style>\n  <a href=//www.google.com/><img 
src=//www.google.com/images/errors/logo_sm.gif alt=Google></a>\n  
<p><b>404.</b> <ins>That\xe2\x80\x99s an error.</ins>\n  <p>The requested URL 
<code>/analytics/feeds/accounts/default?max-results=1000&amp;start-index=1</code
> was not found on this server.  <ins>That\xe2\x80\x99s all we know.</ins>\n', 
'reason': 'Not Found'}

What version of the product are you using?
gdata==2.0.17

Please provide any additional information below.

see also
http://code.google.com/p/gdata-issues/issues/detail?id=2955
https://developers.google.com/analytics/resources/articles/gdata-migration-guide

Original issue reported on code.google.com by harm.ver...@gmail.com on 28 Aug 2012 at 7:32