Crystal03 / google-docs-fs

Automatically exported from code.google.com/p/google-docs-fs
GNU General Public License v2.0
0 stars 0 forks source link

Cannot copy new-format google docs #32

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a Google Doc now, by default using the new Docs app
2. Try to gmount and copy that file to local dir using cp
3. It will report an error.

What is the expected output? What do you see instead?

# Failure with newly created docs
[1539][li14@rowan:~/test_ggl]$ cp my/dir/new_text.doc ~/tests/
cp: cannot open `my/dir/new_text.doc' for reading: Invalid argument

# All old version docs have no problem
[1540][li14@rowan:~/test_ggl]$ cp my/dir/old_file.doc ~/tests/
[1540][li14@rowan:~/test_ggl]$

What version of the product are you using? On what operating system?

Most recent. I use Fedora 12.

Please provide any additional information below.

This is a serious bug that renders the filesystem unusable. This potentially 
was caused by Google's API changes when they introduced new formats. However, 
just doing 'ls' is fine with google-docs-fs, as new docs can also be listed 
normally. It's the actual reading of the file that went wrong.

Original issue reported on code.google.com by mr.xiaof...@gmail.com on 21 Jul 2010 at 2:48

GoogleCodeExporter commented 9 years ago
The debug info is as below:

######################################
LOOKUP /PhD Thesis/Chapter 1 - Introduction/1.1 Life/1.1.3 Protein Structure 
and Interaction/text.doc
getattr /PhD Thesis/Chapter 1 - Introduction/1.1 Life/1.1.3 Protein Structure 
and Interaction/text.doc
   NODEID: 14
   unique: 74, success, outsize: 144
unique: 75, opcode: OPEN (14), nodeid: 14, insize: 48
open flags: 0x8000 /PhD Thesis/Chapter 1 - Introduction/1.1 Life/1.1.3 Protein 
Structure and Interaction/text.doc
/usr/lib/python2.6/site-packages/googledocsfs/gNet.py:195: DeprecationWarning: 
Please use Export instead
  self.gd_client.DownloadDocument(file.resourceId.text, tmp_path.encode(self.codec))
Traceback (most recent call last):
  File "/usr/lib64/python2.6/site-packages/fuse.py", line 361, in __call__
    return apply(self.func, args, kw)
  File "/usr/lib64/python2.6/site-packages/fuse.py", line 775, in wrap
    res = fun(*a, **kw)
  File "/usr/lib/python2.6/site-packages/googledocsfs/gFile.py", line 278, in open
    file = self.gn.get_file(path, tmp_path, f)
  File "/usr/lib/python2.6/site-packages/googledocsfs/gNet.py", line 195, in get_file
    self.gd_client.DownloadDocument(file.resourceId.text, tmp_path.encode(self.codec))
  File "/usr/lib/python2.6/site-packages/atom/__init__.py", line 1475, in deprecated_function
    return f(*args, **kwargs)
  File "/usr/lib/python2.6/site-packages/gdata/docs/service.py", line 361, in Export
    self.Download(entry_or_id_or_url, file_path, ext, gid, extra_params)
  File "/usr/lib/python2.6/site-packages/gdata/docs/service.py", line 340, in Download
    self._DownloadFile(url, file_path)
  File "/usr/lib/python2.6/site-packages/gdata/docs/service.py", line 178, in _DownloadFile
    'body': response_body}
gdata.service.RequestError: {'status': 302, 'body': 
'<HTML>\n<HEAD>\n<TITLE>Moved Temporarily</TITLE>\n</HEAD>\n<BODY 

BGCOLOR="#FFFFFF" TEXT="#000000">\n<H1>Moved Temporarily</H1>\nThe document has 
moved <A 

HREF="http://docs.google.com/feeds/download/documents/Export?

exportFormat=doc&id=1hb0xTc2W5kKIbvnVZaG0yNF0SgdYUS1hGdYW5Li1XSI">here</A>.\n</B
ODY>\n</HTML>\n', 'reason': 'Moved 

Temporarily'}
   unique: 75, error: -22 (Invalid argument), outsize: 16
#######################################

For example. This should be Google's fault as they changed the URI. However, 
Google has suggested using Export() so that the correct doc link is always 
retained.

Original comment by mr.xiaof...@gmail.com on 21 Jul 2010 at 4:16

GoogleCodeExporter commented 9 years ago
Hi,

cheers for this, I'll start work on a fix.

Scott W

Original comment by d38dm8nw81k1ng@gmail.com on 4 Aug 2010 at 8:25

GoogleCodeExporter commented 9 years ago
I've posted a message on GData Python Client. This and Issue 37 are related.

Original comment by d38dm8nw81k1ng@gmail.com on 24 Sep 2010 at 10:06

GoogleCodeExporter commented 9 years ago

Original comment by d38dm8nw81k1ng@gmail.com on 30 Sep 2010 at 8:51

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

Original comment by d38dm8nw81k1ng@gmail.com on 7 Nov 2010 at 2:14

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

Original comment by d38dm8nw81k1ng@gmail.com on 22 Dec 2010 at 9:28

GoogleCodeExporter commented 9 years ago
The problem with GData Python Client has been marked as resolved and should be 
pushed out in v2.0.14 of the library. I'll test it upon release and mark this 
Issue appropriately.

Original comment by d38dm8nw81k1ng@gmail.com on 26 Dec 2010 at 1:21

GoogleCodeExporter commented 9 years ago
Noticed that 2.0.14 is available now 
(http://code.google.com/p/gdata-python-client), couldnt find any Ubuntu package 
for it so I havent tried it my self.

Original comment by sjost...@gmail.com on 7 Mar 2011 at 7:06