It's failing somewhere in encode_multipart_message() in apiclient/multipart.py
The base64 encoded size of a 1.6GB file will be over 2GB - I wonder if this is what's causing it.
There is some code in cypthon's cStringIO with a matching error and matching size:
static int IO_cread(PyObject *self, char **output, Py_ssize_t n) { Py_ssize_t l;
if (!IO__opencheck(IOOOBJECT(self))) return -1; assert(IOOOBJECT(self)->pos >= 0); assert(IOOOBJECT(self)->string_size >= 0); l = ((IOobject*)self)->string_size - ((IOobject*)self)->pos; if (n < 0 || n > l) { n = l; if (n < 0) n=0; } if (n > INT_MAX) { PyErr_SetString(PyExc_OverflowError, "length too large"); return -1; }
*output=((IOobject*)self)->buf + ((IOobject*)self)->pos; ((IOobject*)self)->pos += n; return (int)n; }
It's failing somewhere in encode_ multipart_ message( ) in apiclient/ multipart. py
The base64 encoded size of a 1.6GB file will be over 2GB - I wonder if this is what's causing it.
There is some code in cypthon's cStringIO with a matching error and matching size:
static int
IO_cread(PyObject *self, char **output, Py_ssize_t n) {
Py_ssize_t l;
if (!IO__opencheck (IOOOBJECT( self))) return -1; IOOOBJECT( self)-> pos >= 0); IOOOBJECT( self)-> string_ size >= 0); )self)- >string_ size - ((IOobject* )self)- >pos;
PyErr_ SetString( PyExc_OverflowE rror,
"length too large");
assert(
assert(
l = ((IOobject*
if (n < 0 || n > l) {
n = l;
if (n < 0) n=0;
}
if (n > INT_MAX) {
return -1;
}
*output= ((IOobject* )self)- >buf + ((IOobject* )self)- >pos; )self)- >pos += n;
((IOobject*
return (int)n;
}