Thanks for the snippet, it was a good start point. I'm having a few
issues grabbing that folder object. Am I doing this correctly?
Advice?
#The folder I want to get
logging.debug("want to grab folder: " + root_folder)
# prints: want to grab folder: folder:
0BxnrF1v7z5alNmI5OTJhMzItYTA1YS00MDZjLWFiNjEtNmExMjFiMTAxMTRl
# TRY 1
folder_entry = docClient.GetDoc(root_folder)
# Fails: folder_entry = docClient.GetDoc(root_folder)
# AttributeError: 'DocsService' object has no attribute
'GetDoc'
# TRY 2: I must have the old classes
uri = '
http://docs.google.com/feeds/documents/private/full/' +
root_folder
folder_entry = docClient.Query(uri,
converter=gdata.docs.DocumentListEntryFromString)
root_entry = docClient.Query(folderURI,
converter=gdata.docs.DocumentListEntryFromString)
# FAILS:
# File "/cygdrive/e/project_was/gdata/docs/service.py", line
218, in Query
# return self.Get(uri, converter=converter)
# ...
# return converter(result_body)
# File "/cygdrive/e/project_was/gdata/docs/__init__.py", line
190, in DocumentListEntryFromString
# return atom.CreateClassFromXMLString(DocumentListEntry,
xml_string)
# File "/cygdrive/e/project_was/atom/__init__.py", line 93,
in optional_warn_function
# return f(*args, **kwargs)
# File "/cygdrive/e/project_was/atom/__init__.py", line 128,
in CreateClassFromXMLString
# tree = ElementTree.fromstring(xml_string)
# File "<string>", line 85, in XML
# SyntaxError: not well-formed (invalid token): line 154,
column 60
# TRY 3: long shot - even tried to urlencode: folder:
0BxnrF1v7z5alNmI.. since the ':' character may cause issues.
# FAILS same Error
On Nov 23, 1:29 pm, Eric Bidelman <
api.e...@google.com> wrote:
> Using the new v3.0 classes:
>
> saved_resource_id = 'folder%3A0B9kVjMzJkNjYz'
> folder_entry = client.GetDoc(saved_resource_id)
>
> In the old classes, try my response here:
http://groups.google.com/group/google-documents-list-api/browse_threa...
>
> Eric