seanfrazier / googlecl

Automatically exported from code.google.com/p/googlecl
0 stars 0 forks source link

--folder parameter no longer works in trunk #502

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Download the latest googlecl: svn checkout 
http://googlecl.googlecode.com/svn/trunk/ googlecl-read-only
2. Force Install: sudo python setup.py install --force
3. List Documents in folder: google docs --folder='Newsletters' list

What is the expected output? What do you see instead?
I expect to see all of the documents in the "Newsletters" folder; however, I 
get the following error with a list of all of my documents (inside and outside 
this folder):
  Failed to get entries: Server responded with: 400, <errors xmlns='http://schemas.google.com/g/2005'><error><domain>GData</domain><code>unsupportedQueryParam</code><internalReason>The 'max-results' parameter is not supported on this resource</internalReason></error></errors>
  No folder found that matches Newsletters

What version of the product are you using?
  googlecl revision: 602
  gdata-python-client (python-gdata) id: a8c25010b8b7 tip
On what operating system?
  Ubuntu 12.04.1 LTS (x86_64) (3.2.0-33-generic)

Please provide any additional information below.
  If I download the 'googlecl-0.9.13' tarball and force install, then the --folder parameter works as expected

Original issue reported on code.google.com by nshenr...@gmail.com on 18 Nov 2012 at 4:45

GoogleCodeExporter commented 9 years ago

Original comment by szy...@endpoint.com on 6 Dec 2012 at 7:31

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r606.

Original comment by szy...@endpoint.com on 6 Dec 2012 at 8:16

GoogleCodeExporter commented 9 years ago
Fixed in trunk, will be in release 0.9.14.

Original comment by szy...@endpoint.com on 6 Dec 2012 at 8:17

GoogleCodeExporter commented 9 years ago
Thanks szy...@endpoint.com, that works correctly; however, now it looks like 
the upload feature has some problems:
google docs upload --title="Newsletter $(date --date=$(echo ${originalPDF} | 
sed -e 's/^.*_//' -e 's/\..*$//') +'%B %d, %Y')" --folder="Newsletters" 
${originalPDF}

The file uploads; however, it just uploads to the Google Docs root folder...  I 
don't see any errors or anything; however, if it matters, this folder is a 
'Shared' folder...

Thanks,
Nick

Original comment by nshenr...@gmail.com on 7 Dec 2012 at 4:13

GoogleCodeExporter commented 9 years ago
Hi Nick,
thanks for the information. One question: when it working for you, which gdata 
version you were using?

Original comment by szy...@endpoint.com on 7 Dec 2012 at 4:45

GoogleCodeExporter commented 9 years ago
The latest from trunk on Nov 18th:
gdata-python-client (python-gdata) id: a8c25010b8b7 tip

I just updated to the lastest again and had the same issue (it uploaded to the 
root directory rather than the 'Newsletters" directory...
 * hg clone https://code.google.com/p/gdata-python-client/
 * hg id
    * > f76c53eaf151 tip
 * sudo python setup.py install --force
 * google docs upload --title="TEST" --folder="Newsletters" ~/Documents/ChefTrainingMaterials/FND-Instructor-Guide.pdf
    * > Upload success! Direct link: https://docs.google.com/a/changed.org/file/d/0B0Eh_O0RTru9LXZsekFraGdqcWM/edit

Thanks,
Nick

P.S. Thanks a bunch, even w/o it going to the right folder, this script saves 
me lots of time and effort! :-D

Original comment by nshenr...@gmail.com on 7 Dec 2012 at 5:30

GoogleCodeExporter commented 9 years ago
Seems like there is a bug in gdata, currently I cannot do anything about this.

Created two issues in the gdata project:

* http://code.google.com/p/gdata-python-client/issues/detail?id=651
* http://code.google.com/p/gdata-python-client/issues/detail?id=652

Original comment by szy...@endpoint.com on 12 Dec 2012 at 1:23

GoogleCodeExporter commented 9 years ago
Great, thank you! :-)

Original comment by nshenr...@gmail.com on 12 Dec 2012 at 5:15

GoogleCodeExporter commented 9 years ago
Hello, I am having the same problem.  Any other solution than waiting for fix 
in gdata?  Thanks.

Original comment by JMRichar...@gmail.com on 15 Feb 2013 at 8:04

GoogleCodeExporter commented 9 years ago
We're pretty much tied to what's in python gdata, sorry.  One interesting 
question is whether the bug is in the python gdata library, or a problem in the 
underlying gdata JSON interface.  If it's the latter, then you wouldn't even be 
able to fix it by patching python gdata.

Original comment by jh...@google.com on 15 Feb 2013 at 8:13

GoogleCodeExporter commented 9 years ago
Sigh. Wish I'd seen this issue 2 hours ago... never mind. Good to know it's not 
me doing something wrong.

Would be good to get a note/warning in the docs, though, until gdata is fixed.

https://code.google.com/p/googlecl/wiki/ExampleScripts#upload says
"Note: --folder will accept only one folder to upload into. If you have two or 
more folders with the same name, even subfolders, you will have to pick between 
them (hard to do when they have the same name)".

https://code.google.com/p/googlecl/source/browse/trunk/src/googlecl/docs/service
.py says:

Some use cases:
Upload a document:
  docs upload --folder "Some folder" path_to_doc

But in this ticket, the format 
--folder="Newsletters"
is used.

Not that any of the above in any order work. I've starred the two issues opened 
by szy... in #7.

Seems to be a lot of issues from a fair while ago in the gdata project not 
accepted yet and quite quiet on the commit front.

I'm using googlecl 0.9.14 checked out from SVN which includes gdata 2.0.17.
Python 2.7.3

Original comment by digitaltoast on 8 Mar 2013 at 11:00

GoogleCodeExporter commented 9 years ago
Issue 516 has been merged into this issue.

Original comment by jh...@google.com on 5 Apr 2013 at 7:04

GoogleCodeExporter commented 9 years ago
Issue 517 has been merged into this issue.

Original comment by jh...@google.com on 5 Apr 2013 at 7:05

GoogleCodeExporter commented 9 years ago
Thanks digitaltoast for mentioning the docs. I've updated that page to note 
that --folder is currently broken.

Original comment by jh...@google.com on 5 Apr 2013 at 7:10

GoogleCodeExporter commented 9 years ago
Any updates on this problem?

Original comment by ary...@gmail.com on 9 Nov 2014 at 3:44