Reputation: 1697
I'm trying to set up OAuth with Google services. Following the example here, I'm using:
try:
from xml.etree import ElementTree
except ImportError:
from elementtree import ElementTree
import gdata.calendar.data
import gdata.calendar.client
import gdata.acl.data
import gdata
import atom
import getopt
import sys
import string
import time
CONSUMER_KEY = "xxx"
CONSUMER_SECRET = "xxx"
TOKEN = "xxx"
TOKEN_SECRET = "xxx"
client = gdata.docs.client.DocsClient(source='xxx')
And Python throws AttributeError: "'module' object has no attribute 'docs'"
when it tries to create the client.
Upvotes: 0
Views: 2824
Reputation: 129109
You've import
ed gdata
but not gdata.docs.client
. Add this with the rest of your import
s:
import gdata.docs.client
Upvotes: 2