0

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.

2
  • What's the import statement you're using? Commented Sep 11, 2011 at 3:19
  • @icktoofay Added to original post, thanks Commented Sep 11, 2011 at 3:21

1 Answer 1

2

You've imported gdata but not gdata.docs.client. Add this with the rest of your imports:

import gdata.docs.client
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.