Dan
Dan

Reputation: 1697

Google OAuth AttributeError: "'module' object has no attribute 'docs'"

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

Answers (1)

icktoofay
icktoofay

Reputation: 129109

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

import gdata.docs.client

Upvotes: 2

Related Questions