hschauhan / gosync

An Opensource Google Drive client written in Python
https://hschauhan.github.io/gosync/
GNU General Public License v2.0
281 stars 57 forks source link

Several errors after successful instalation #62

Closed ricardocmello closed 1 year ago

ricardocmello commented 3 years ago

Hi, I just installed GoSync 0.53 on an Ubuntu 20.04.2 machine. It will initialize, allow me to set the credentials, to change mirror directory, but won't calculate my Drive usage or actually sync anything. Sometimes I get the following error:

Traceback (most recent call last):
  File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.8/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.8/dist-packages/GoSync/GoSyncModel.py", line 2151, in calculateUsage
    self.RetrieveAbout_Drive()
  File "/usr/local/lib/python3.8/dist-packages/GoSync/GoSyncModel.py", line 272, in RetrieveAbout_Drive
    if ('limit' not in self.about_drive['storageQuota']) :
KeyError: 'storageQuota'

My account has unlimited storage and I notice that this part of the code targets this situation.

If I keep restarting the program, sometimes I get different errors such as this:

Exception in thread Thread-4:
Traceback (most recent call last):
  File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.8/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.8/dist-packages/GoSync/GoSyncModel.py", line 2151, in calculateUsage
    self.RetrieveAbout_Drive()
  File "/usr/local/lib/python3.8/dist-packages/GoSync/GoSyncModel.py", line 268, in RetrieveAbout_Drive
    self.about_drive = self.drive.about().get(fields='user, storageQuota').execute()
  File "/home/ricardo/.local/lib/python3.8/site-packages/googleapiclient/_helpers.py", line 134, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "/home/ricardo/.local/lib/python3.8/site-packages/googleapiclient/http.py", line 920, in execute
    resp, content = _retry_request(
  File "/home/ricardo/.local/lib/python3.8/site-packages/googleapiclient/http.py", line 191, in _retry_request
    resp, content = http.request(uri, method, *args, **kwargs)
  File "/home/ricardo/.local/lib/python3.8/site-packages/google_auth_httplib2.py", line 218, in request
    response, content = self.http.request(
  File "/home/ricardo/.local/lib/python3.8/site-packages/httplib2/__init__.py", line 1708, in request
    (response, content) = self._request(
  File "/home/ricardo/.local/lib/python3.8/site-packages/httplib2/__init__.py", line 1424, in _request
    (response, content) = self._conn_request(conn, request_uri, method, body, headers)
  File "/home/ricardo/.local/lib/python3.8/site-packages/httplib2/__init__.py", line 1376, in _conn_request
    response = conn.getresponse()
  File "/usr/lib/python3.8/http/client.py", line 1347, in getresponse
    response.begin()
  File "/usr/lib/python3.8/http/client.py", line 307, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python3.8/http/client.py", line 268, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/usr/lib/python3.8/socket.py", line 669, in readinto
    return self._sock.recv_into(b)
  File "/usr/lib/python3.8/ssl.py", line 1241, in recv_into
    return self.read(nbytes, buffer)
  File "/usr/lib/python3.8/ssl.py", line 1099, in read
    return self._sslobj.read(len, buffer)
OSError: [Errno 0] Error

Sometimes I get a Segmentation fault (core dumped) if I try reopening the program too fast. Not sure if it's an actual bug or if I'm doing something wrong, but I couldn't find another issue to help me with it.

Oleg-dM commented 3 years ago

Got the same error OSError: [Errno 0] Error

Also, GoSync does not seem to be syncing (sync folder remains empty) - is there a way to check if files are being synced?

hschauhan commented 3 years ago

I don't have an unlimited account to test. I will try to add exception around this check.