iwonbigbro/gsync

ZeroDivisionError

Opened this issue · 0 comments

First of all, thanks for making what seems to be a great tool... unfortunately it doesn't work for me...

I'm trying to sync some local files to the drive which include git files. In particular the MERGE_RR file in the git directory are empty (at the moment), and this raises an error when trying to sync.

DEBUG: ZeroDivisionError('float division by zero',):   File "/usr/local/lib/python2.7/dist-packages/libgsync/crawler.py", line 150, in run
    self._walk(srcpath, self._walkCallback, self._dev)
  File "/usr/local/lib/python2.7/dist-packages/libgsync/crawler.py", line 124, in _walk
    self._sync(f)
  File "/usr/local/lib/python2.7/dist-packages/libgsync/sync/__init__.py", line 31, in __call__
    self._sync(path)
  File "/usr/local/lib/python2.7/dist-packages/libgsync/sync/__init__.py", line 188, in _sync
    self.dst.create(dstPath, srcFile)
  File "/usr/local/lib/python2.7/dist-packages/libgsync/sync/file/__init__.py", line 316, in create
    self.__createFile(path, srcObj)
  File "/usr/local/lib/python2.7/dist-packages/libgsync/sync/file/__init__.py", line 219, in __createFile
    self._updateFile(path, src)
  File "/usr/local/lib/python2.7/dist-packages/libgsync/sync/file/remote/__init__.py", line 105, in _updateFile
    progress(MediaUploadProgress(bytesWritten, bytesWritten))
  File "/usr/local/lib/python2.7/dist-packages/libgsync/output.py", line 104, in __call__
    self.percentage = int(status.progress() * 100.0)
  File "/usr/local/lib/python2.7/dist-packages/apiclient/http.py", line 82, in progress
    return float(self.resumable_progress) / float(self.total_size)

Error: ZeroDivisionError('float division by zero',)
sent 216232514 bytes  received 0 bytes  143479398.29 bytes/sec

I'd rather not skip these files since then I would have a problem if the reverse sync deleted them. Anything I can do? This seems to be the current best way to still be able to use google drive in ubuntu.