Google2Piwik
Google2Piwik copied to clipboard
Occasional rate limit issue
In some cases (maybe because this is not a very busy site) requests are issued too quickly and I get this exception:
Traceback (most recent call last):
File "./google2piwik.py", line 665, in <module>
export_period(start_date, end_date)
File "./google2piwik.py", line 72, in export_period
export_day(str(currentdate), fetcher)
File "./google2piwik.py", line 120, in export_day
simulator.update(fetcher, d, "ga:visits")
File "./google2piwik.py", line 384, in update
fetcher.FeedFetch(dimensions, metrics, self.day)
File "./google2piwik.py", line 489, in FeedFetch
self.feed = self.client.GetDataFeed(data_query)
File "/usr/local/lib/python2.7/dist-packages/gdata/analytics/client.py", line 77, in get_data_feed
**kwargs)
File "/usr/local/lib/python2.7/dist-packages/gdata/client.py", line 640, in get_feed
**kwargs)
File "/usr/local/lib/python2.7/dist-packages/gdata/client.py", line 319, in request
RequestError)
gdata.client.RequestError: Server responded with: 403, <?xml version="1.0" encoding="UTF-8"?><errors xmlns="http://schemas.google.com/g/2005"><error><domain>usageLimits</domain><code>userRateLimitExceeded</code><internalReason>User Rate Limit Exceeded</internalReason></error></errors>