googlearchive/PyDrive

While trying to trying to upload a 3GB file, i get this error..

Opened this issue · 4 comments

user@ubuntu:~#drive add_remote --file file.rar
Traceback (most recent call last):
File "/usr/local/bin/drive", line 11, in
sys.exit(cli())
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 764, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/drive_cli/actions.py", line 169, in create_remote
utils.upload_file(file, file_path, pid)
File "/usr/local/lib/python2.7/dist-packages/drive_cli/utils.py", line 375, in upload_file
fields='id').execute()
File "/usr/local/lib/python2.7/dist-packages/googleapiclient/discovery.py", line 865, in method
g.flatten(msgRoot, unixfrom=False)
File "/usr/lib/python2.7/email/generator.py", line 83, in flatten
self._write(msg)
File "/usr/lib/python2.7/email/generator.py", line 108, in _write
self._dispatch(msg)
File "/usr/lib/python2.7/email/generator.py", line 134, in _dispatch
meth(msg)
File "/usr/lib/python2.7/email/generator.py", line 203, in _handle_multipart
g.flatten(part, unixfrom=False)
File "/usr/lib/python2.7/email/generator.py", line 83, in flatten
self._write(msg)
File "/usr/lib/python2.7/email/generator.py", line 108, in _write
self._dispatch(msg)
File "/usr/lib/python2.7/email/generator.py", line 134, in _dispatch
meth(msg)
File "/usr/lib/python2.7/email/generator.py", line 180, in _handle_text
self._fp.write(payload)
OverflowError: length too large

a5r0n commented

For large files, Use resumable uploads..
I will open PR to fix it soon as possible

a5r0n commented

@Rajssss
From your log it appears that you are using drive-cli project..
https://github.com/nurdtechie98/drive-cli

But anyway, PyDrive also seems to have this issue

@Rajssss
From your log it appears that you are using drive-cli project..
https://github.com/nurdtechie98/drive-cli

But anyway, PyDrive also seems to have this issue

I had drive-cli previously which also had problems, then i switched to pydrive...

a5r0n commented

I had drive-cli previously which also had problems, then i switched to pydrive...

just install drive-cli from dev branch.
PR 79