Hi all,
I'm using the python client gdata-2.0.9 to retrieve data feeds from
Google Analytics.
I'm running the same code on a Mac OS 10.6.3 and on a Debian 5.0, both
running python 2.6.5. Here's the bit of the code that instantiates the
client and tries to login
import sys
sys.path.append('lib/gdata-2.0.9/src')
from sys import argv, stderr
from datetime import datetime, timedelta, date
from re import search
import gdata.analytics.client
import glob, os, csv, codecs, cStringIO
def get_logged_in_ga_client(email, password, source):
""" Instantiate a google analytics client and try to login """
ga_client = gdata.analytics.client.AnalyticsClient()
try:
ga_client.client_login(
email = email,
password = password,
source = source,
service = 'analytics',
account_type = 'GOOGLE'
)
except gdata.client.Error as e:
print >>stderr, e
exit(1)
return ga_client
This code executes just fine on the Mac, but gives me the following
error in Debian, which suggests that my python installation may be
missing something, but I can't figure out what:
Traceback (most recent call last):
File "extract_fact_snapshot_daily_pageviews.py", line 156, in
<module>
main()
File "extract_fact_snapshot_daily_pageviews.py", line 151, in main
ga_client = get_logged_in_ga_client(ga_email, ga_password,
source=os.path.basename(argv[0]))
File "extract_fact_snapshot_daily_pageviews.py", line 74, in
get_logged_in_ga_client
account_type = 'GOOGLE'
File "lib/gdata-2.0.9/src/gdata/client.py", line 442, in
client_login
captcha_token=captcha_token, captcha_response=captcha_response)
File "lib/gdata-2.0.9/src/gdata/client.py", line 341, in
request_client_login_token
response = self.http_client.request(http_request)
File "lib/gdata-2.0.9/src/atom/http_core.py", line 420, in request
http_request.headers, http_request._body_parts)
File "lib/gdata-2.0.9/src/atom/http_core.py", line 460, in
_http_request
connection = self._get_connection(uri, headers=headers)
File "lib/gdata-2.0.9/src/atom/http_core.py", line 530, in
_get_connection
return HttpClient._get_connection(self, uri, headers=headers)
File "lib/gdata-2.0.9/src/atom/http_core.py", line 435, in
_get_connection
connection = httplib.HTTPSConnection(uri.host)
AttributeError: 'module' object has no attribute 'HTTPSConnection'
Does anyone know what is going on?
Any help is most appreciated.
Thank you
Marcos
--
You received this message because you are subscribed to the Google Groups "GA Data Export API" group.
To post to this group, send email to
google-analytics...@googlegroups.com.
To unsubscribe from this group, send email to
google-analytics-data-...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/google-analytics-data-export-api?hl=en.