googlearchive / PyDrive

Google Drive API Python wrapper library
Other
1.31k stars 273 forks source link

OverflowError: Python int too large to convert to C long #220

Open armqtt opened 3 years ago

armqtt commented 3 years ago

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

shcheklein commented 3 years ago

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