carolinux / gdata-python-client

Automatically exported from code.google.com/p/gdata-python-client
0 stars 1 forks source link

docs_examples.py does not work #486

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

trying to play with python-gdata, I was experiencing problems uploading 
documents. I stopped looking at my own code and tried to start from scratch 
looking at the examples. But... docs_examples.py is raising exactly the same 
error as my code:

Document List Sample
1) List your documents.
2) Search your documents.
3) Upload a document.
4) Download a document.
5) List a document's permissions.
6) Add/change a document's permissions.
7) Exit.

> 1
Retrieve (all/document/folder/presentation/spreadsheet/pdf):
Enter a category: all
Traceback (most recent call last):
  File "docs_example.py", line 347, in <module>
    main()
  File "docs_example.py", line 343, in main
    sample.Run()
  File "docs_example.py", line 291, in Run
    self._ListDocuments()
  File "docs_example.py", line 177, in _ListDocuments
    feed = self.gd_client.GetDocumentListFeed()
  File "/usr/lib/pymodules/python2.6/gdata/docs/service.py", line 252, in GetDocumentListFeed
    return self.QueryDocumentListFeed(uri)
  File "/usr/lib/pymodules/python2.6/gdata/docs/service.py", line 231, in QueryDocumentListFeed
    return self.Get(uri, converter=gdata.docs.DocumentListFeedFromString)
  File "/usr/lib/pymodules/python2.6/gdata/service.py", line 1068, in Get
    return converter(result_body)
  File "/usr/lib/pymodules/python2.6/gdata/docs/__init__.py", line 245, in DocumentListFeedFromString
    return atom.CreateClassFromXMLString(DocumentListFeed, xml_string)
  File "/usr/lib/pymodules/python2.6/atom/__init__.py", line 92, in optional_warn_function
    return f(*args, **kwargs)
  File "/usr/lib/pymodules/python2.6/atom/__init__.py", line 126, in CreateClassFromXMLString
    tree = ElementTree.fromstring(xml_string)
  File "<string>", line 85, in XML
SyntaxError: syntax error: line 1, column 54

3 conclusions so far:

    - nothing to do with my code
    - nothing to do with upload
    - reproducible with the last version installed from source and 
      2.0.8-1.1 packaged in Ubuntu 10.10

I googled a bit but did not find anything. Any clue?

Jean-Philippe

Original issue reported on code.google.com by jphthier...@gmail.com on 13 Jan 2011 at 4:45

GoogleCodeExporter commented 9 years ago
Solved; due to a proxy issue even if environment variables were set. My code is 
now working as expected even if docs_examples.py is struggling with unicode 
chars

Jean-Philippe

Original comment by jphthier...@gmail.com on 13 Jan 2011 at 8:52

GoogleCodeExporter commented 9 years ago

Original comment by vicfry...@google.com on 14 Jan 2011 at 7:54