googlearchive/PyDrive

OverflowError: Python int too large to convert to C long

Opened this issue · 1 comments

Bug Report.

When I use pydrive to download video that bigger than around 5GB. The API show this message. How to solve this.

By the way, my python version is Python 3.8.2 with windows platform.

Downloading file: video.mp4 5.0GiB .\movie

Traceback (most recent call last):
File "H:\PyGdriveAPI\gdriveDownload.py", line 196, in
> doDownload(diffResult)
File "H:\PyGdriveAPI\gdriveDownload.py", line 166, in doDownload
doDownload(sub, path + '\' + sub['foldername'])
File "H:\PyGdriveAPI\gdriveDownload.py", line 160, in doDownload
> downloadFile.GetContentFile(downFileName + ts)
File "C:\Users\su\AppData\Local\Programs\Python\Python39\lib\site-packages\pydrive\files.py", line 210, in GetContentFile
self.FetchContent(mimetype, remove_bom)
File "C:\Users\su\AppData\Local\Programs\Python\Python39\lib\site-packages\pydrive\files.py", line 43, in _decorated
> return decoratee(self, *args, **kwargs)
File "C:\Users\su\AppData\Local\Programs\Python\Python39\lib\site-packages\pydrive\files.py", line 255, in FetchContent
self.content = io.BytesIO(self._DownloadFromUrl(download_url))
File "C:\Users\su\AppData\Local\Programs\Python\Python39\lib\site-packages\pydrive\auth.py", line 75, in _decorated
> return decoratee(self, *args, **kwargs)
File "C:\Users\su\AppData\Local\Programs\Python\Python39\lib\site-packages\pydrive\files.py", line 503, in DownloadFromUrl
resp, content = self.http.request(url)
File "C:\Users\su\AppData\Local\Programs\Python\Python39\lib\site-packages\oauth2client\transport.py", line 173, in new_request
> resp, content = request(orig_request_method, uri, method, body,
File "C:\Users\su\AppData\Local\Programs\Python\Python39\lib\site-packages\oauth2client\transport.py", line 280, in request
return http_callable(uri, method=method, body=body, headers=headers,
File "C:\Users\su\AppData\Local\Programs\Python\Python39\lib\site-packages\httplib2_init
.py", line 1967, in request
> (response, content) = self.request(
File "C:\Users\su\AppData\Local\Programs\Python\Python39\lib\site-packages\httplib2_init
.py", line 1639, in _request
(response, content) = self.conn_request(
File "C:\Users\su\AppData\Local\Programs\Python\Python39\lib\site-packages\httplib2_init
.py", line 1607, in _conn_request
> content = response.read()
File "C:\Users\su\AppData\Local\Programs\Python\Python39\lib\http\client.py", line 471, in read
s = self._safe_read(self.length)
File "C:\Users\su\AppData\Local\Programs\Python\Python39\lib\http\client.py", line 612, in _safe_read
> data = self.fp.read(amt)
File "C:\Users\su\AppData\Local\Programs\Python\Python39\lib\socket.py", line 704, in readinto
return self._sock.recv_into(b)
File "C:\Users\su\AppData\Local\Programs\Python\Python39\lib\ssl.py", line 1241, in recv_into
> return self.read(nbytes, buffer)
File "C:\Users\su\AppData\Local\Programs\Python\Python39\lib\ssl.py", line 1099, in read
return self._sslobj.read(len, buffer)
OverflowError: Python int too large to convert to C long

@armqtt could you please try to run it with PyDrive2 (a maintained version of this package)?