PyDrive icon indicating copy to clipboard operation
PyDrive copied to clipboard

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

Open Rajssss opened this issue 6 years ago • 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

Rajssss avatar Nov 22 '19 06:11 Rajssss

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

a5r0n avatar Dec 16 '19 14:12 a5r0n

@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

a5r0n avatar Dec 16 '19 15:12 a5r0n

@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...

Rajssss avatar Dec 16 '19 16:12 Rajssss

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

just install drive-cli from dev branch. PR 79

a5r0n avatar Dec 17 '19 12:12 a5r0n